Re: [Zope-dev] GitHub and Travis CI

2013-03-05 Thread Godefroid Chapelle

Le 04/03/13 20:00, Stephan Richter a écrit :

Hi everyone,

I have invested some time today to implement the Travis CI hook setup for
GitHub. I can now turn on and update Travis CI for any package.



See the ``README.rst`` file.


I did the same in z3c.taskqueue and five.taskqueue that Stephan very 
nicely migrated for me.


Thanks to you, Stephan !
--
Godefroid Chapelle (aka __gotcha) http://bubblenet.be

___
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] Zope Foundation patch policy

2012-10-16 Thread Godefroid Chapelle

Le 09/10/12 09:39, Jens Vagelpohl a écrit :

Hi all,

During the discussion about new ways to host and manage code in Zope Foundation 
repositories one omission we had never really addressed became clear: What is 
the status of patches reaching us by people who have not signed the contributor 
agreement, e.g. code uploaded to issue trackers, or code checked into Zope 
Foundation repositories by people other than the original authors? We need to 
have guidelines that ensure that we don't end up with code exclusively owned by 
third parties where no ownership assignment has taken place in our repositories.

Fortunately the Plone Foundation has considered this exact issue before us and 
we took their well-written patch policy[1] and adapted it for our own use. 
Thanks to the Plone Foundation board and all those who drafted their policy.

The Zope Foundation board has voted on adopting the following text as the 
official Zope Foundation patch policy, binding for all Zope Foundation 
contributors (PDF alert):

http://foundation.zope.org/agreements/ZopeFoundation_Patch_Policy.pdf

Jens Vagelpohl



Thanks a lot to the board of having taken time and energy to fix this 
omission.


Regards
--
Godefroid Chapelle (aka __gotcha) http://bubblenet.be

___
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-Checkins] SVN: Zope/trunk/src/App/Undo.py `undoMultiple` was still broken as transactions were not undone in the proper

2011-09-19 Thread Godefroid Chapelle
Log message for revision 122838:
  `undoMultiple` was still broken as transactions were not undone in the proper
order : tids were stored and retrieved as dictionary keys. 
  

Changed:
  U   Zope/trunk/src/App/Undo.py

-=-
Modified: Zope/trunk/src/App/Undo.py
===
--- Zope/trunk/src/App/Undo.py  2011-09-19 09:57:57 UTC (rev 122837)
+++ Zope/trunk/src/App/Undo.py  2011-09-19 10:03:54 UTC (rev 122838)
@@ -132,15 +132,17 @@
 def manage_undo_transactions(self, transaction_info=(), REQUEST=None):
 
 
-tids = {}
+tids = []
+descriptions = []
 for tid in transaction_info:
 tid = tid.split()
 if tid:
-tids[decode64(tid[0])] = tid[-1]
+tids.append(decode64(tid[0]))
+descriptions.append(tid[-1])
 
 if tids:
-transaction.get().note(Undo %s % ' '.join(tids.values()))
-self._p_jar.db().undoMultiple(tids.keys())
+transaction.get().note(Undo %s % ' '.join(descriptions))
+self._p_jar.db().undoMultiple(tids)
 
 if REQUEST is None:
 return

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-dev] response.status is not set properly when Zope2 publication failure events are notified

2011-09-12 Thread Godefroid Chapelle
Hi,

Short story :

response.status is not set when PubBeforeAbort and PubFailure events are 
notified.

Any code in the event handlers trying to use response.status always gets 
200 even though an exception has happened.

Longer story :

publish function in ZPublisher.Publish.py is notifiying all publication 
events ZPublisher.interfaces.IPubEvent.

It is called by publish_module_standard function which is in charge of 
transforming exceptions into HTTP status by calling response.exception().

However, this happens after the publishing events have been notified.

IOW, when failure events (PubBeforeAbort and PubFailure) are notified, 
request.status is still 200 :-(

Proposal attempt:

First, a disclaimer : there are so many nested try except, try finally 
in publish and publish_module_standard functions that I am sure I do not 
fully understand the code. However, I'll state my thoughts as a starting 
point.

I have the feeling that moving the call to response.exception() into the 
publish function before the events are notified would break a lot of 
code. Maybe we could just move the setStatus() call made in 
response.exception().

We might move the notification of PubFailure to response.exception(). 
However, its semantics would then change slightly and it is not obvious 
which exc_info would then be passed to the event.

I'd appreciate feedback on this issue.
-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be
___
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] More information in case of ZCML conflict errors

2011-08-10 Thread Godefroid Chapelle
Le 02/08/11 15:29, Sylvain Viollon a écrit :

 Hello,

 I spend a long time trying to understand why I could not override a
 component in ZCML and debug the error.

 First, includeOverrides doesn't include any overriding registration.
 At least not like you would expect. At best It can be used to include a 
 package
 in the site.zcml that would conflict with an another, replacing the 
 conflicting actions
 by his own.

 After I would love, when there is a conflict error in ZCML to have a bit 
 more
 of information other than what we currently have: like which file include 
 which file
 and so up to the conflicting actions. As I pdb through this conflict, I 
 see that
 all this information is already there, it is just not included in the 
 exception nor
 displayed to the user.

 This information can be found in zope.configuration.config line 1517, in
 the variable includepath and basepath. This just need to be added to the
 exception.

 Since I work with Zope and ZCML, having those informations to debug
 conflict errors would have saved me days of works, at least.

 My issue was that an another package was already including the package 
 that contained
 actions I wanted to override, so even if I wanted to include it myself in 
 order to
 override its actions, it would not be included since it already have been 
 included.

 Finally, I think a bit of documentation on ZCML conflict errors would 
 help a lot
 everybody.

 Regards,

 Sylvain,


I bumped recently on the exact same issue.

I totally agree with your statements.

I think it is really worth changing the message issued by the 
configuration conflict errors.

I hope I will be able to work on this in the coming weeks.

Sylvain, I'll let you know.
-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be

___
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-31 Thread Godefroid Chapelle
Le 27/05/11 10:03, Hanno Schlichting a écrit :
 On Thu, May 26, 2011 at 10:39 PM, Godefroid Chapelle
 got...@bubblenet.be  wrote:
 Le 26/05/11 17:15, Hanno Schlichting a écrit :
 Smaller 1.4.x numbers could be kept for bug fix releases for CMF 2.1 and
 Plone 3.

 That's a really weird way of doing it. And I'm a -1 on that.

 I agree it is a bit weird, I am just trying to be creative to comply with
 your request of preserving Plone 3 tests.

 Outside being weird, can you explain issues you have ?

 You want to backport a feature that is known to break things into a
 stable release series.

It does not break things, this is too wide.

GS test suite was not touched outside places where tests did check 
internal implementation.

It would be much more fair to state that it is known to break tests setup.

 To me that's just wrong and defeats the very purpose of having stable 
 releases.

 Hanno

What I am actually trying to understand is which versions to give to 
public releases after forking an existing branch.

The numbering scheme of those versions should fill the following goals :

- systems that depend on releases of the original branch should not be 
impacted.

- new releases of the original branch should be pullable without the 
need to touch the existing systems.

- releases of the newest branch should have their own numbering so that 
other packages can state unambiguous dependency on those new releases.

This is what dev releases are for (as you suggested).

My proposal is then the following : I would publish a 
Products.GenericSetup 1.4.6dev001 release from my backported branch to PyPi.

And have p.a.testing 3.0.x depend explicitely on this GS 1.4.6dev001 
release until there is a need for a new release of GS from this 
backported branch.

Opinions ?

-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be

___
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-CMF] GenericSetup backport

2011-05-31 Thread Godefroid Chapelle
Le 31/05/11 15:36, Hanno Schlichting a écrit :
 My proposal is then the following : I would publish a
   Products.GenericSetup 1.4.6dev001 release from my backported branch to 
  PyPi.
 Sorry, but publishing dev releases is frowned upon on PyPi.

The arguments against the proposal seem lighter and lighter.

I begin to feel zope-dev like stop energy.

 The version numbering scheme we have doesn't allow for you use-case.
 You want to effectively fork the 1.4 release series to continue with a
 different feature set than we have already gotten in the 1.5 and 1.6
 series.
 
 We have a stable feature releases in all of the 1.4, 1.5 and 1.6
 series. If you want to introduce any new feature you can only do this
 in the 1.6.x or 1.7 release series. Anything else means doing a
 private fork and publishing it under some other URL.

 It's really not that hard to do that and will only cost you ten
 minutes.

True as I told already.

 Anyone who wants to use this version will need a find-links
 URL in addition to the version pin, but that's just one extra line of
 config.

But the user needs to know that he needs to add that line.

 Doing this means keeping things sane and stable for the
 majority of users

Using a dev release does the same without the need for debugging broken 
cases where the user did not know.

 and adding a tiny little bit of extra work for the
 few that want to run your backport. I think that is a very sane
 approach.

 Hanno

Constructively ;-)
-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be
___
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-CMF] GenericSetup backport

2011-05-26 Thread Godefroid Chapelle
Le 26/05/11 17:15, Hanno Schlichting a écrit :
 On Thu, May 26, 2011 at 4:46 PM, Godefroid Chapellegot...@bubblenet.be  
 wrote:
 Would anyone see an issue that I release a Products.GenericSetup 1.4.20
 (or any other big integer) with ZCA registries ?

 Smaller 1.4.x numbers could be kept for bug fix releases for CMF 2.1 and
 Plone 3.

 That's a really weird way of doing it. And I'm a -1 on that.

I agree it is a bit weird, I am just trying to be creative to comply 
with your request of preserving Plone 3 tests.

Outside being weird, can you explain issues you have ?


 Why don't you just cut a branch of GenericSetup 1.4 with your changes
 and make a private (vendor) release of it?

 Then put the private release up on some Web server serving a flat
 directory, including it into the buildout via find-links? We do that
 all the time, see for example http://dist.jarn.com/public/

I obviously thought of an egg on our own server. Nevertheless, at least 
Vitaliy Podoba from Quintagroup also uses p.a.testing 3.x and I'd like 
him (and others) to be able to also use p.a.testing released eggs.

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.

 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


Re: [Zope-dev] beta.zope.org (www.zope.org relaunch project)

2011-05-10 Thread Godefroid Chapelle
Le 10/05/11 10:47, Hanno Schlichting a écrit :
 On Tue, May 10, 2011 at 6:55 AM, Andreas Jungli...@zopyx.com  wrote:
 I am happy to announce that we have made progress
 with the zope.org relaunch project. The first public
 version of the new site is now available under

 http://beta.zope.org

 Constructive criticism and feedback is welcome _now_.

 Thanks all of you for the great work. It is much appreciated!

 Hanno

I want to support that statement ! :-)

Great work !

-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be
___
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-CMF] GenericSetup backport

2011-04-26 Thread Godefroid Chapelle
Hi,

I had made changes to GS registries (use ZCA instead of own registries) 
which got released in 1.6.3.

I backported those changes to 1.4.

http://zope3.pov.lt/trac/browser/Products.GenericSetup/branches/1.4-with-global-zca

Can I merge to 1.4 branch ?

Would someone cut a new 1.4 release after merge ?

Thanks
-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be

___
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-CMF] GenericSetup backport

2011-04-26 Thread Godefroid Chapelle
Le 26/04/11 12:04, Hanno Schlichting a écrit :
 On Tue, Apr 26, 2011 at 11:53 AM, Godefroid Chapelle
 got...@bubblenet.be  wrote:
 I had made changes to GS registries (use ZCA instead of own registries)
 which got released in 1.6.3.

 I backported those changes to 1.4.

 http://zope3.pov.lt/trac/browser/Products.GenericSetup/branches/1.4-with-global-zca

 Can I merge to 1.4 branch ?

 Please don't. The changes broke quite a number of tests

This feels acceptable to me.

 and some of my own code.

But this does not. Can you explain more ? I'd like to understand how 
your code got broken, which I did not foresee at all. This way, I'll 
learn how to avoid same type of issues for a next case.

 It's bad enough this got into the 1.6 bug fix releases, even
 though it's a feature change.

 Most tests failed as the ZCA now has to be setup before calling
 certain API's like profile_registry.registerProfile. It's been a
 very common pattern in Plone add-ons to call this on the module level
 of a test to register a test-only profile.

I guess it should be possible to ensure ZCA is setup from within GS.
Would that help ?

 We have adjusted most of the test layers for the recent Plone release,
 so the change can stay in the 1.6.x series from my point of view.

I made a few fixes to test layers for Plone 4.1. Can you point me to the 
other changes that you had to do ?

 But if would be a lot of pain to do this for Plone 3.x releases using
 GenericSetup 1.4.

I see.

 Hanno

-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be

___
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] Zope test layers, pytest, and test isolation

2011-03-24 Thread Godefroid Chapelle
Hi Uli,

I am happy that some people started to look what is needed to make 
modular component registrations with py.test.

The long explanation that you wrote made it easy for me to jump into 
funcargs.

Those last months, I have been diving into the great plone.testing 
package written by Martin Aspeli.

Among others, plone.testing has a very nice module zca.py to ease 
building zope.testing layers that need ZCA.

See 
https://dev.plone.org/plone/browser/plone.testing/trunk/src/plone/testing/zca.py

Specifically, pushGlobalRegistry and popGlobalRegistry are a pair of 
functions that allow to make registrations step by step, while easily 
throwing away the latest registrations when they are not needed anymore.

plone.testing does not depend on Zope2 even if it comes with support for 
building Zope2 layers.

Le 24/03/11 01:05, Uli Fouquet a écrit :
 Compared to Zope test layers I came to the conclusion that there is not
 much like this concept already in `pytest` and the behaviour of test
 layers can not easily be faked. `pytest` provides only the three
 mentioned scopes as kind of 'natural' layers. Spreading fixtures over
 many modules (as layers easily do) might contradict with the basic
 design goals of pytest and I am pretty sure that Holge Krekel wouldn't
 like it.

I do not agree with that last statement : the fact that resources can be 
cached during a session allows them to be reused over many modules. IOW, 
it does not contradict pytest design.

Digging into funcargs gives me the feeling that they are much richer 
than layers.
Because funcargs are functions that get access to a lot of context, they 
allow for more flexibility than layers that are only static resources.

 Overall, we're now looking for a satisfying solution in terms of runtime
 and isolation. Some of the questions that arise:

My feeling is that the extrakey argument of cached_setup can be used in 
combination with code similar to plone.testing ZCA support to build 
something satisfying in terms of runtime and isolation.


 Would it make sense to bring the Zope layer concept into `pytest`?

I think what is already available in py.test might avoid the need of layers.

 Are there already possibilities to mimic testlayer-like behaviour in
 `pytest` which we simply overlooked?

See above.


 Are there cheap/fast ways to cache/restore registry setups we hadn't had
 on the screen? Really fast setups/cache-restores could make even
 function-wise registrations a considerable thing.

 Would it simply be okay to use the 'module' scope for registration
 setups?

 Or do you have completely different ideas how to solve that issue?

 Any comments are really appreciated!

 Best regards,

 -- Uli


-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be

___
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] SVN: Products.GenericSetup/trunk/ Refactored global registries to use global named utilities.

2011-03-11 Thread Godefroid Chapelle
Hi Yvo,

Thanks for reviewing my work !

Le 11/03/11 10:43, yuppie a écrit :
 Hi Godefroid!


 A few questions:

 Godefroid Chapelle wrote:
 Log message for revision 120850:
 Refactored global registries to use global named utilities.

 merge of branch gotcha-registries-use-utilities
 [...]
 Modified: Products.GenericSetup/trunk/Products/GenericSetup/registry.py
 ===
 --- Products.GenericSetup/trunk/Products/GenericSetup/registry.py
 2011-03-10 15:13:48 UTC (rev 120849)
 +++ Products.GenericSetup/trunk/Products/GenericSetup/registry.py
 2011-03-10 16:56:57 UTC (rev 120850)
 [...]
 @@ -721,13 +758,26 @@
 # metadata.xml description trumps ZCML description... awkward
 info.update( metadata )

 - self._profile_info[ profile_id ] = info
 + sm.registerUtility(info, provided=IProfile, name=profile_id)

 + def _computeProfileId(self, name, product):
 + profile_id = '%s:%s' % (product or 'other', name)
 + return profile_id
 +
 + security.declareProtected( ManagePortal, 'unregisterProfile' )
 + def unregisterProfile( self, name, product=None):
 + profile_id = self._computeProfileId(name, product)
 + sm = getGlobalSiteManager()
 + sm.unregisterUtility(provided=IProfile, name=profile_id)
 +
 security.declarePrivate( 'clear' )
 def clear( self ):
 + sm = getGlobalSiteManager()
 + profile_ids = [profile_id for profile_id, profile_info
 + in sm.getUtilitiesFor(IProfile)]
 + for profile_id in profile_ids:
 + sm.unregisterUtility(provided=IProfile, name=profile_id)

 - self._profile_info = {}
 - self._profile_ids = []

 Does GlobalRegistryStorage not work for the ProfileRegistry?

Good point.

Done ! I did it for UpgradeRegistry as well.



 Modified:
 Products.GenericSetup/trunk/Products/GenericSetup/tests/test_registry.py
 ===
 ---
 Products.GenericSetup/trunk/Products/GenericSetup/tests/test_registry.py
 2011-03-10 15:13:48 UTC (rev 120849)
 +++
 Products.GenericSetup/trunk/Products/GenericSetup/tests/test_registry.py
 2011-03-10 16:56:57 UTC (rev 120850)
 @@ -1014,6 +1014,8 @@
 , ConformsToIProfileRegistry
 ):

 +
 +
 def _getTargetClass( self ):

 from Products.GenericSetup.registry import ProfileRegistry
 @@ -1045,7 +1047,7 @@
 , PRODUCT
 , PROFILE_TYPE
 )
 -
 +
 self.assertEqual( len( registry.listProfiles() ), 1 )
 self.assertEqual( len( registry.listProfileInfo() ), 1 )

 You touched test_registry.py just to add some extra whitespace in
 strange places?

Sorry for the noise. Do you want a revert ?



 Modified: Products.GenericSetup/trunk/Products/GenericSetup/zcml.py
 ===
 --- Products.GenericSetup/trunk/Products/GenericSetup/zcml.py
 2011-03-10 15:13:48 UTC (rev 120849)
 +++ Products.GenericSetup/trunk/Products/GenericSetup/zcml.py
 2011-03-10 16:56:57 UTC (rev 120850)
 [...]
 def cleanUpImportSteps():
 - global _import_step_regs
 - for name in _import_step_regs:
 - try:
 - _import_step_registry.unregisterStep(name)
 - except KeyError:
 - pass
 + pass

 - _import_step_regs = []
 -
 def cleanUpExportSteps():
 - global _export_step_regs
 - for name in _export_step_regs:
 - try:
 - _export_step_registry.unregisterStep(name)
 - except KeyError:
 - pass
 + pass

 Why didn't you remove cleanUpImportSteps and cleanUpExportSteps?

I should have.

All cleanup functions are now gone.



 Cheers,

 Yuppie


-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be
___
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-CMF] GenericSetup global registries

2011-03-09 Thread Godefroid Chapelle
Le 09/03/11 15:09, Wichert Akkerman a écrit :
 It all looks like a workaround
 for a missing feature in plone.testing, which won't even help much since
 plone.testing needs to support older GS releases as well.

 Wichert.

The change I made is internal implementation only.

IOW, it can go into a new 1.6.x GenericSetup release...

... which next Plone 4.0.x and 4.1 can both use (AFAIK they use the same 
version of GenericSetup).

This way, plone.testing (which is still not final) can be cleaned up.

-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be

___
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] GenericSetup global registries

2011-03-08 Thread Godefroid Chapelle
Hello,

GenericSetup has global registries for profiles and steps.

They are a PITA when testing.

For instance, plone.app.testing has to make a complicated dance to 
record and restore their state.

In branch gotcha-registries-use-utilities, I have removed those global 
storages.

The profiles and steps are instead registered as global named utilities.

All tests pass.

I would appreciate review :

http://zope3.pov.lt/trac/changeset?old_path=%2FProducts.GenericSetup%2Fbranches%2Fgotcha-registries-use-utilitiesold=120672new_path=%2FProducts.GenericSetup%2Fbranches%2Fgotcha-registries-use-utilitiesnew=120738

If I get no comment within 1 week, I'll assume I can merge and will do so.

TIA ;-)
-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be

___
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-CMF] GenericSetup global registries

2011-03-08 Thread Godefroid Chapelle
Le 08/03/11 17:26, Wichert Akkerman a écrit :
 On 2011-3-8 17:08, Godefroid Chapelle wrote:
   Hello,
 
   GenericSetup has global registries for profiles and steps.
 
   They are a PITA when testing.
 
   For instance, plone.app.testing has to make a complicated dance to
   record and restore their state.
 How come? There is a very simple cleanup function for them iirc?

zope.testing.cleanup functions are all or nothing; there are no ways to 
clear a part of what was loaded through ZCML.

plone.testing zca.py uses component registry chaining to enable partial 
unload of components registrations.

-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be

___
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] GenericSetup import and export step registries

2011-03-02 Thread Godefroid Chapelle
Hi,

I have been looking at GenericSetup tool.py.

The order in which global and local registries are queried is different 
in getImportStep and getExportStep on one side and in 
getImportStepMetadata and getExportStepMetadata on the other side.

See below:

def getExportStep(self, step, default=None):
 Simple wrapper to query both the global and local step 
registry.
 res=_export_step_registry.getStep(step, default)
 if res is not default:
 return res
 return self._export_registry.getStep(step, default)

def getExportStepMetadata(self, step, default=None):
 Simple wrapper to query both the global and local step 
registry.
 res=self._export_registry.getStepMetadata(step, default)
 if res is not default:
 return res
 return _export_step_registry.getStepMetadata(step, default)

I have looked at the SVN history and it seems that there has been 
merging problems.

In line with usual ZCA pattern which queries local before global, I 
guess that the local registry should be queried before the global like 
in getImportStepMetadata and getExportStepMetadata.

IOW, it seems it should be :

def getExportStep(self, step, default=None):
 Simple wrapper to query both the global and local step 
registry.
 res=self._export_step_registry.getStep(step, default)
 if res is not default:
 return res
 return _export_registry.getStep(step, default)

def getExportStepMetadata(self, step, default=None):
 Simple wrapper to query both the global and local step 
registry.
 res=self._export_registry.getStepMetadata(step, default)
 if res is not default:
 return res
 return _export_step_registry.getStepMetadata(step, default)


Can someone confirm ?

-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be

___
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-CMF] GenericSetup import and export step registries

2011-03-02 Thread Godefroid Chapelle
Le 02/03/11 14:59, Godefroid Chapelle a écrit :
 IOW, it seems it should be :

  def getExportStep(self, step, default=None):
   Simple wrapper to query both the global and local step
 registry.
   res=self._export_step_registry.getStep(step, default)
   if res is not default:
   return res
   return _export_registry.getStep(step, default)

I meant :

 def getExportStep(self, step, default=None):
  Simple wrapper to query both the global and local step
registry.
  res=self._export_registry.getStep(step, default)
  if res is not default:
  return res
  return _export_step_registry.getStep(step, default)


-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be

___
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-dev] string exceptions

2011-02-25 Thread Godefroid Chapelle
Hi,

I find a few string exceptions leftover in Zope 2.13 code.

However, they are not allowed anymore in Python 2.6.

I guess that the remaining string exceptions are in dead/semidead code.

What practice has been followed until now regarding fixing those 
exceptions ?

Regards
-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be

___
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] string exceptions

2011-02-25 Thread Godefroid Chapelle
Le 25/02/11 12:03, Laurence Rowe a écrit :
 On 25 February 2011 10:58, Godefroid Chapellegot...@bubblenet.be  wrote:
 Hi,

 I find a few string exceptions leftover in Zope 2.13 code.

 However, they are not allowed anymore in Python 2.6.

 I guess that the remaining string exceptions are in dead/semidead code.

 What practice has been followed until now regarding fixing those
 exceptions ?

 According to this doc,
 http://docs.python.org/c-api/exceptions.html#deprecation-of-string-exceptions

 String exceptions are still supported in the interpreter to allow
 existing code to run unmodified, but this will also change in a future
 release.

 It will of course be important to fix these before we move to Python
 3.x, but I would expect that the dead/semidead code will not be
 ported.

 Laurence

I just tried to run the code hereunder with Python 2.6.5:

def main():
 raise Abc

main()

This is what I get :

Traceback (most recent call last):
   File test.py, line 4, in module
 main()
   File test.py, line 2, in main
 raise Abc
TypeError: exceptions must be old-style classes or derived from 
BaseException, not str

I am not sure what the documentation above means but it seems to be text 
that was not fixed...
-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be
___
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] string exceptions

2011-02-25 Thread Godefroid Chapelle
Le 25/02/11 12:03, Hanno Schlichting a écrit :
 I find a few string exceptions leftover in Zope 2.13 code.
 
   What practice has been followed until now regarding fixing those
   exceptions ?
 Just upgrade them to new-style exception classes. Since string
 exceptions cannot possibly work anymore, we cannot make things worse
 by fixing them.

 Hanno

What about deciding to kill that code ?

I guess it is a bit early because not enough people did migrate to 2.12 
or later.

Where should those fixes happen ?

2.13 branch and trunk I suppose

-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be

___
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-CMF] String exceptions

2011-02-25 Thread Godefroid Chapelle
Hi,

Python2.6 has deprecated string exceptions.

However, I find about 15 string exceptions in CMF 2.2

I guess this is just something that was forgotten.

Can we consider this as a critical issue for next release ?

Regards
-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be

___
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-CMF] String exceptions

2011-02-25 Thread Godefroid Chapelle
Le 25/02/11 15:23, Laurence Rowe a écrit :
 As mentioned on the zope-dev list, string exceptions were actually
 removed int Python 2.6. I still don't think it's critical though, it
 just raises a TypeError now instead of a string exception.

 Laurence

Right, they are not critical. I once again spoke before thinking deep 
enough.

-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be

___
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] TypesTool and contruction permissions

2011-01-25 Thread Godefroid Chapelle
Hello,

I always thought I could register two portal types based on the same 
class with different add permissions.

I read TypesTool code today. If I understand well, when using new style 
ZTK factories, construction permissions are looked up in meta_types 
registration.

I came to the following conclusion :

to register separate portal_types that share class implementation but 
have different contruction permissions, I need to register meta_types 
with separate permissions then use those meta_types in the FTIs to 
relate the permissions and the portal_types.

Is this correct ?
-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be

___
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-CMF] SVN: Products.CMFCore/branches/2.2/Products/CMFCore/exportimport/content.py remove type check that seem useless

2011-01-13 Thread Godefroid Chapelle
Hi,

I have fixed an exportimport bug on branch 2.2 : see tests in revision 
119560.

I'd like some review before merging the fix into trunk.

I do not know for sure that I can remove the type check.

Thanks

Gotcha

Le 13/01/11 12:00, Godefroid Chapelle a écrit :
 Log message for revision 119561:
remove type check that seem useless

 Changed:
U   Products.CMFCore/branches/2.2/Products/CMFCore/exportimport/content.py

 -=-
 Modified: 
 Products.CMFCore/branches/2.2/Products/CMFCore/exportimport/content.py
 ===
 --- Products.CMFCore/branches/2.2/Products/CMFCore/exportimport/content.py
 2011-01-13 10:44:41 UTC (rev 119560)
 +++ Products.CMFCore/branches/2.2/Products/CMFCore/exportimport/content.py
 2011-01-13 11:00:16 UTC (rev 119561)
 @@ -101,15 +101,9 @@
   parser = ConfigParser()

   title = self.context.Title()
 -if isinstance(title, unicode):
 -title_str = title.encode(self._encoding)
 -else:
 -title_str = title
 +title_str = title.encode(self._encoding)
   description = self.context.Description()
 -if isinstance(description, unicode):
 -description_str = description.encode(self._encoding)
 -else:
 -description_str = description
 +description_str = description.encode(self._encoding)
   parser.set('DEFAULT', 'Title', title_str)
   parser.set('DEFAULT', 'Description', description_str)


-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be

___
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-CMF] SVN: Products.CMFCore/branches/2.2/Products/CMFCore/exportimport/content.py remove type check that seem useless

2011-01-13 Thread Godefroid Chapelle
Le 13/01/11 12:07, Wichert Akkerman a écrit :
 On 1/13/11 12:04 , Godefroid Chapelle wrote:
 Hi,

 I have fixed an exportimport bug on branch 2.2 : see tests in revision
 119560.

 Aren't you risking double encoding now? That patch looks like it makes
 things worse, not better.

I am not sure I understand what you mean.

I did try the patch on one of my sites where export was raising an 
exception. Export did work and the files produced make sense to me.

In the branch, prior to apply the patch, I added tests that mimic my 
site setup and do not pass.

With the patch, they pass.


 Wichert.

-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be

___
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-CMF] SVN: Products.CMFCore/branches/2.2/Products/CMFCore/exportimport/content.py remove type check that seem useless

2011-01-13 Thread Godefroid Chapelle
Le 13/01/11 14:02, Wichert Akkerman a écrit :
 On 1/13/11 14:01 , Godefroid Chapelle wrote:


 Le 13/01/11 12:07, Wichert Akkerman a écrit :
 On 1/13/11 12:04 , Godefroid Chapelle wrote:
 Hi,

 I have fixed an exportimport bug on branch 2.2 : see tests in revision
 119560.

 Aren't you risking double encoding now? That patch looks like it makes
 things worse, not better.

 I am not sure I understand what you mean.

 I did try the patch on one of my sites where export was raising an
 exception. Export did work and the files produced make sense to me.

 In the branch, prior to apply the patch, I added tests that mimic my
 site setup and do not pass.

 But do you know why? The original code was more robust than your
 version, so I am extremely curious why it was failing for you and is not
 now.

 Wichert.

Reproducing the bug is extremely easy : install a bare Plone 4 site with 
language french (this creates content with accented characters that 
trigger the bug) then try an export or snapshot in portal_setup.

What your comment might imply is that the creation of default content in 
a Plone site is the culprit, rather than the export code in CMFCore.

You make me wonder if I am actually reproducing something wrong in my 
tests setup : am I allowed to set a unicode value in Title and Description ?

The code hereunder is setting up the tests :


 ITEMS_TITLE = u'Actualit\xe9'
 ITEMS_DESCRIPTION = u'Actualit\xe9 r\xe9centes'
 for id in ITEM_IDS:
 site._setObject(id, _makeINIAware(id))
 item = getattr(site, id)
 item.setTitle(ITEMS_TITLE)
 item.setDescription(ITEMS_DESCRIPTION)


-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be

___
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-CMF] SVN: Products.CMFCore/branches/2.2/Products/CMFCore/exportimport/content.py remove type check that seem useless

2011-01-13 Thread Godefroid Chapelle
Le 13/01/11 14:17, Godefroid Chapelle a écrit :
 Le 13/01/11 14:02, Wichert Akkerman a écrit :
 On 1/13/11 14:01 , Godefroid Chapelle wrote:


 Le 13/01/11 12:07, Wichert Akkerman a écrit :
 On 1/13/11 12:04 , Godefroid Chapelle wrote:
 Hi,

 I have fixed an exportimport bug on branch 2.2 : see tests in revision
 119560.

 Aren't you risking double encoding now? That patch looks like it makes
 things worse, not better.

 I am not sure I understand what you mean.

 I did try the patch on one of my sites where export was raising an
 exception. Export did work and the files produced make sense to me.

 In the branch, prior to apply the patch, I added tests that mimic my
 site setup and do not pass.

 But do you know why? The original code was more robust than your
 version, so I am extremely curious why it was failing for you and is not
 now.

 Wichert.

 Reproducing the bug is extremely easy : install a bare Plone 4 site with
 language french (this creates content with accented characters that
 trigger the bug) then try an export or snapshot in portal_setup.

 What your comment might imply is that the creation of default content in
 a Plone site is the culprit, rather than the export code in CMFCore.

 You make me wonder if I am actually reproducing something wrong in my
 tests setup : am I allowed to set a unicode value in Title and Description ?

 The code hereunder is setting up the tests :

 
   ITEMS_TITLE = u'Actualit\xe9'
   ITEMS_DESCRIPTION = u'Actualit\xe9 r\xe9centes'
   for id in ITEM_IDS:
   site._setObject(id, _makeINIAware(id))
   item = getattr(site, id)
   item.setTitle(ITEMS_TITLE)
   item.setDescription(ITEMS_DESCRIPTION)
 

I want to add that this setup triggers the same exception as in a live 
Plone site.

-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be

___
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-CMF] SVN: Products.CMFCore/branches/2.2/Products/CMFCore/exportimport/content.py remove type check that seem useless

2011-01-13 Thread Godefroid Chapelle
Le 13/01/11 14:41, Charlie Clark a écrit :
 Am 13.01.2011, 14:01 Uhr, schrieb Godefroid Chapellegot...@bubblenet.be:

 Aren't you risking double encoding now? That patch looks like it makes
 things worse, not better.
 I am not sure I understand what you mean.

 Hi Godefroid,

 the unpatched code checks to see whether a self.Title() or
 self.Description() are unicode in which case they can be encoded.

I think what you call the unpatched code is my first attempt at fixing 
the bug (iow revision 119560).

My first message to the list might not be clear enough to express that I 
am actually asking review for both revision 119560 and 119561.

 Your patch will force encoding even on strings, ie. double-encoding.

If I understand well, you tell me that my first attempt could be correct 
while the second revision takes the risk to double encode.

Tell me if you agree with patch in 119560.

 Regarding the procedure: changes to the CMF should be tested on CMF
 buildouts, with CMF specific tests.

This is what I did ;-)

I even added the missing buildout (copied from trunk - see revision 119553).

 You should probably run the
 exportimport with pdb to see what self.Title() is returning but, yes, I
 suspect the problem you are experiencing is Plone and not CMF related.

I am still not convinced.

 Charlie

-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be

___
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-CMF] SVN: Products.CMFCore/branches/2.2/Products/CMFCore/exportimport/content.py remove type check that seem useless

2011-01-13 Thread Godefroid Chapelle
Le 13/01/11 17:03, Godefroid Chapelle a écrit :
 Le 13/01/11 15:04, Tres Seaver a écrit :

 This change should be reverted -- you now double-encode any
 already-encoded UTF=8 strings.  We should probably add a test for that
 condition.

 Change reverted, test added in 119566.


After having tuned the patch and its tests, I merged into trunk.

-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be

___
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-CMF] CMF dev buildouts

2011-01-13 Thread Godefroid Chapelle
Le 13/01/11 17:50, yuppie a écrit :
 Godefroid Chapelle wrote:
 One buildout per package is the practice in ZTK world.

 I have come to really appreciate it; it really lowers the barrier for
 contributions.

 checkout
 bootstrap
 buildout
 run tests to check state before changes
 fix
 run tests
 commit

 That only works if someone makes sure bootstrap.py and buildout.cfg are
 up to date.

True.

However, making this type of version pinning is not too hard as I 
usually can rely on the fact that the last developer checked the tests 
were running before committing.

 You just did have to update buildout.cfg on CMFCore trunk.

 Cheers, Yuppie

-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be

___
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-dev] ConnectionStateError

2011-01-12 Thread Godefroid Chapelle
Hello,

We have been experiencing some ConnectionStateError in a Zope 2 based 
application.

Looking for info on the web makes me almost 100% sure that we have a bug 
in our application layer.

I understand that I should look for persistent objects stored in module 
or class level variables (which imply shared by threads and thus 
connections). Do not hesitate to tell me if this is a wrong explanation 
of the potential cause of ConnectionStateError.

However, I wonder if some of you could give debugging techniques outside 
reviewing the code.

I also wonder what was the reason to deprecate ``zope.thread``. I see it 
was used by ``zope.component`` to hold thread-safe siteinfo. Could a too 
frequent usage of getSite lead to ConnectionStateError ? I think that it 
is not the case but I prefer to ask.

Thanks
-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be

___
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] ConnectionStateError

2011-01-12 Thread Godefroid Chapelle
Le 12/01/11 17:06, Hanno Schlichting a écrit :
 On Wed, Jan 12, 2011 at 2:34 PM, Godefroid Chapellegot...@bubblenet.be  
 wrote:
 I understand that I should look for persistent objects stored in module
 or class level variables (which imply shared by threads and thus
 connections). Do not hesitate to tell me if this is a wrong explanation
 of the potential cause of ConnectionStateError.

 However, I wonder if some of you could give debugging techniques outside
 reviewing the code.

Thanks for help from anyone.

Once debugged, I'll blog how I found the bug.

 Do you get the classic: Shouldn't load state for %s when the
 connection is closed or one of the The database connection is
 closed errors?

 In the first case you get the p_oid, which you can load from the
 database to give you some clue on what class it is.

I had no clue that the number in the error message was the p_oid. I 
could have found out by reading the code.

Nevertheless, I propose to make the error message more self-explanatory.

 Typical problems include using plone.memoize decorators on things
 without knowing where exactly the cache is stored or as someone else
 noted registering persistent objects in the global site manager
 instead of the local one. The global one is of course just a module
 global data structure in the end.

 Hanno

-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be

___
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] zope.schema validation can create read/write conflicts

2010-12-25 Thread Godefroid Chapelle
Le 24/12/10 13:03, Souheil CHELFOUH a écrit :
 Done and commited.

Thanks !

 If anyone can and want to release, it's ready.

3.7.1 released.

-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be
___
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] z3c.table and z3c.batching PYPI access

2010-08-20 Thread Godefroid Chapelle
Hi,

jfroche and I will need to make releases of z3c.table and z3c.batching.

Can someone grant me access on PYPI ?

Thanks

userid: gotcha
-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be
___
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] New release of z3c.form

2010-07-01 Thread Godefroid Chapelle
Hi z3c.form fathers ;-)

jfroche and I added a widget manager that enables mixing content 
providers inbetween widgets when rendering forms.

We merged our branch to trunk :

http://permalink.gmane.org/gmane.comp.web.zope.all-cvs/43663

We would like a new release of z3c.form.
Can you give us access rights to PyPI ?
Or can you make the release ?

Regards,
-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be
___
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] New release of z3c.form

2010-07-01 Thread Godefroid Chapelle
Le 01/07/10 14:16, Godefroid Chapelle a écrit :
 Hi z3c.form fathers ;-)

 jfroche and I added a widget manager that enables mixing content
 providers inbetween widgets when rendering forms.

 We merged our branch to trunk :

 http://permalink.gmane.org/gmane.comp.web.zope.all-cvs/43663

 We would like a new release of z3c.form.
 Can you give us access rights to PyPI ?
 Or can you make the release ?

 Regards,

Adam gave me access...

Before doing a release, I checked the web for documentation.

I found http://docs.zope.org/z3c.form/

Last updated Nov 08,2009 Version 1.8.2dev.

What is the process to get the latest version published ?

-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be
___
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] New release of z3c.form

2010-07-01 Thread Godefroid Chapelle
Le 01/07/10 14:53, Stephan Richter a écrit :
 On Thursday, July 01, 2010, Godefroid Chapelle wrote:
 I found http://docs.zope.org/z3c.form/

 Last updated Nov 08,2009 Version 1.8.2dev.

 What is the process to get the latest version published ?

 Not sure. I think Paul Carduner did that. Since z3c.form is Sphinx-enabled, I
 wonder whether we could stick the docs into
 http://packages.python.org/z3c.form.

 Manuel does this already:

 http://packages.python.org/manuel/

 Regards,
 Stephan

Done

http://packages.python.org/z3c.form

Who will get rid of http://docs.zope.org/z3c.form/ ?

-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be

___
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-Checkins] SVN: Zope/trunk/doc/WHATSNEW.rst typo

2010-06-27 Thread Godefroid Chapelle
Log message for revision 113909:
  typo

Changed:
  U   Zope/trunk/doc/WHATSNEW.rst

-=-
Modified: Zope/trunk/doc/WHATSNEW.rst
===
--- Zope/trunk/doc/WHATSNEW.rst 2010-06-26 18:54:40 UTC (rev 113908)
+++ Zope/trunk/doc/WHATSNEW.rst 2010-06-27 08:30:57 UTC (rev 113909)
@@ -116,4 +116,4 @@
 In order to ease the transition, five.formlib has been backported to the 2.12
 release series. Starting in 2.12.3 you can already use the new five.formlib
 package, but backwards compatibility imports are left in place in 
Products.Five.
-This allows you to easily adopt your packages to work with both 2.12 and 2.13.
+This allows you to easily adapt your packages to work with both 2.12 and 2.13.

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/gotcha-processlifetime/src/Zope2/App/tests/test_startup.py add tests for DatabaseOpened events

2010-06-27 Thread Godefroid Chapelle
Log message for revision 113921:
  add tests for DatabaseOpened events

Changed:
  A   Zope/branches/gotcha-processlifetime/src/Zope2/App/tests/test_startup.py

-=-
Added: Zope/branches/gotcha-processlifetime/src/Zope2/App/tests/test_startup.py
===
--- Zope/branches/gotcha-processlifetime/src/Zope2/App/tests/test_startup.py
(rev 0)
+++ Zope/branches/gotcha-processlifetime/src/Zope2/App/tests/test_startup.py
2010-06-27 10:29:00 UTC (rev 113921)
@@ -0,0 +1,43 @@
+##
+#
+# Copyright (c) 2010 Zope Foundation and Contributors.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED AS IS AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##
+
+import logging
+
+from Testing.ZopeTestCase import ZopeTestCase
+
+from zope.testing.loggingsupport import InstalledHandler
+
+logged = Zope2.App.test_startup INFO
+  class 'zope.processlifetime.DatabaseOpened'
+Zope2.App.test_startup INFO
+  class 'zope.processlifetime.DatabaseOpenedWithRoot'
+
+
+def logevent(event):
+logger = logging.getLogger('Zope2.App.test_startup')
+logger.info(event.__class__)
+
+
+class StartupTests(ZopeTestCase):
+
+def test_dummy(self):
+from Zope2.App.startup import startup
+from zope.component import provideHandler
+from zope.processlifetime import IDatabaseOpened
+from zope.processlifetime import IDatabaseOpenedWithRoot
+
+handler = InstalledHandler('Zope2.App.test_startup')
+provideHandler(logevent, [IDatabaseOpenedWithRoot])
+provideHandler(logevent, [IDatabaseOpened])
+startup()
+self.assertEqual(str(handler), logged)

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/gotcha-processlifetime/src/Zope2/App/tests/test_startup.py also tests events are correctly populated

2010-06-27 Thread Godefroid Chapelle
Log message for revision 113922:
  also tests events are correctly populated

Changed:
  U   Zope/branches/gotcha-processlifetime/src/Zope2/App/tests/test_startup.py

-=-
Modified: 
Zope/branches/gotcha-processlifetime/src/Zope2/App/tests/test_startup.py
===
--- Zope/branches/gotcha-processlifetime/src/Zope2/App/tests/test_startup.py
2010-06-27 10:29:00 UTC (rev 113921)
+++ Zope/branches/gotcha-processlifetime/src/Zope2/App/tests/test_startup.py
2010-06-27 11:09:01 UTC (rev 113922)
@@ -20,12 +20,32 @@
 logged = Zope2.App.test_startup INFO
   class 'zope.processlifetime.DatabaseOpened'
 Zope2.App.test_startup INFO
-  class 'zope.processlifetime.DatabaseOpenedWithRoot'
+  class 'ZODB.DB.DB'
+Zope2.App.test_startup INFO
+  Root not ready.
+Zope2.App.test_startup INFO
+  class 'zope.processlifetime.DatabaseOpenedWithRoot'
+Zope2.App.test_startup INFO
+  class 'ZODB.DB.DB'
+Zope2.App.test_startup INFO
+  class 'OFS.Application.Application'
 
 
 def logevent(event):
 logger = logging.getLogger('Zope2.App.test_startup')
 logger.info(event.__class__)
+db = event.database
+logger.info(db.__class__)
+conn = db.open()
+try:
+try:
+root = conn.root()
+app = root['Application']
+logger.info(app.__class__)
+except KeyError:
+logger.info('Root not ready.')
+finally:
+conn.close()
 
 
 class StartupTests(ZopeTestCase):

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/gotcha-processlifetime/doc/CHANGES.rst update changelog

2010-06-27 Thread Godefroid Chapelle
Log message for revision 113934:
  update changelog

Changed:
  U   Zope/branches/gotcha-processlifetime/doc/CHANGES.rst

-=-
Modified: Zope/branches/gotcha-processlifetime/doc/CHANGES.rst
===
--- Zope/branches/gotcha-processlifetime/doc/CHANGES.rst2010-06-27 
13:44:55 UTC (rev 113933)
+++ Zope/branches/gotcha-processlifetime/doc/CHANGES.rst2010-06-27 
13:52:05 UTC (rev 113934)
@@ -117,6 +117,8 @@
 Features Added
 ++
 
+- Added notification of IDatabaseOpenedWithRoot.
+
 - LP #142226: Added an extra keyword argument to the HTTPResponse 
   setCookie method to suppress enclosing the cookie value field 
   in double quotes.

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/trunk/ merge branch gotcha-processlifetime

2010-06-27 Thread Godefroid Chapelle
Log message for revision 113935:
  merge branch gotcha-processlifetime
  
  notify IDatabaseOpenedWithRoot
  
  test also for IDatabaseOpened
  

Changed:
  U   Zope/trunk/doc/CHANGES.rst
  U   Zope/trunk/src/Zope2/App/startup.py
  A   Zope/trunk/src/Zope2/App/tests/test_startup.py

-=-
Modified: Zope/trunk/doc/CHANGES.rst
===
--- Zope/trunk/doc/CHANGES.rst  2010-06-27 13:52:05 UTC (rev 113934)
+++ Zope/trunk/doc/CHANGES.rst  2010-06-27 13:58:58 UTC (rev 113935)
@@ -18,6 +18,8 @@
 Features Added
 ++
 
+- Added notification of IDatabaseOpenedWithRoot.
+
 - Added a new API's ``get_registered_packages, set_registered_packages`` to
   ``OFS.metaconfigure`` which replace any direct access to
   ``Products._registered_packages``.

Modified: Zope/trunk/src/Zope2/App/startup.py
===
--- Zope/trunk/src/Zope2/App/startup.py 2010-06-27 13:52:05 UTC (rev 113934)
+++ Zope/trunk/src/Zope2/App/startup.py 2010-06-27 13:58:58 UTC (rev 113935)
@@ -16,6 +16,7 @@
 from zope.component import queryMultiAdapter
 from zope.event import notify
 from zope.processlifetime import DatabaseOpened
+from zope.processlifetime import DatabaseOpenedWithRoot
 
 from AccessControl.SecurityManagement import newSecurityManager
 from AccessControl.SecurityManagement import noSecurityManager
@@ -134,6 +135,8 @@
 global startup_time
 startup_time = asctime()
 
+notify(DatabaseOpenedWithRoot(DB))
+
 Zope2.zpublisher_transactions_manager = TransactionsManager()
 Zope2.zpublisher_exception_hook = zpublisher_exception_hook
 Zope2.zpublisher_validated_hook = validated_hook
@@ -206,7 +209,7 @@
 else:
 error_log_url = log.raising((t, v, traceback))
 
-if (REQUEST is None or 
+if (REQUEST is None or
 (getattr(REQUEST.get('RESPONSE', None), '_error_format', '')
  != 'text/html')):
 raise t, v, traceback
@@ -277,7 +280,6 @@
 response.setStatus(t)
 response.setBody(v)
 return response
-
 finally:
 traceback = None
 

Copied: Zope/trunk/src/Zope2/App/tests/test_startup.py (from rev 113934, 
Zope/branches/gotcha-processlifetime/src/Zope2/App/tests/test_startup.py)
===
--- Zope/trunk/src/Zope2/App/tests/test_startup.py  
(rev 0)
+++ Zope/trunk/src/Zope2/App/tests/test_startup.py  2010-06-27 13:58:58 UTC 
(rev 113935)
@@ -0,0 +1,63 @@
+##
+#
+# Copyright (c) 2010 Zope Foundation and Contributors.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED AS IS AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##
+
+import logging
+
+from Testing.ZopeTestCase import ZopeTestCase
+
+from zope.testing.loggingsupport import InstalledHandler
+
+logged = Zope2.App.test_startup INFO
+  class 'zope.processlifetime.DatabaseOpened'
+Zope2.App.test_startup INFO
+  class 'ZODB.DB.DB'
+Zope2.App.test_startup INFO
+  Root not ready.
+Zope2.App.test_startup INFO
+  class 'zope.processlifetime.DatabaseOpenedWithRoot'
+Zope2.App.test_startup INFO
+  class 'ZODB.DB.DB'
+Zope2.App.test_startup INFO
+  class 'OFS.Application.Application'
+
+
+def logevent(event):
+logger = logging.getLogger('Zope2.App.test_startup')
+logger.info(event.__class__)
+db = event.database
+logger.info(db.__class__)
+conn = db.open()
+try:
+try:
+root = conn.root()
+app = root['Application']
+logger.info(app.__class__)
+except KeyError:
+logger.info('Root not ready.')
+finally:
+conn.close()
+
+
+class StartupTests(ZopeTestCase):
+
+def test_dummy(self):
+from Zope2.App.startup import startup
+from zope.component import provideHandler
+from zope.processlifetime import IDatabaseOpened
+from zope.processlifetime import IDatabaseOpenedWithRoot
+
+handler = InstalledHandler('Zope2.App.test_startup')
+provideHandler(logevent, [IDatabaseOpenedWithRoot])
+provideHandler(logevent, [IDatabaseOpened])
+startup()
+self.assertEqual(str(handler), logged)

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/gotcha-processlifetime/ merged to trunk

2010-06-27 Thread Godefroid Chapelle
Log message for revision 113938:
  merged to trunk

Changed:
  D   Zope/branches/gotcha-processlifetime/

-=-
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/trunk/ cleanup

2010-06-27 Thread Godefroid Chapelle
Log message for revision 113939:
  cleanup

Changed:
  U   Zope/trunk/doc/CHANGES.rst
  U   Zope/trunk/src/Zope2/App/tests/test_startup.py

-=-
Modified: Zope/trunk/doc/CHANGES.rst
===
--- Zope/trunk/doc/CHANGES.rst  2010-06-27 14:02:32 UTC (rev 113938)
+++ Zope/trunk/doc/CHANGES.rst  2010-06-27 14:05:02 UTC (rev 113939)
@@ -18,7 +18,7 @@
 Features Added
 ++
 
-- Added notification of IDatabaseOpenedWithRoot.
+- Added notification of ``IDatabaseOpenedWithRoot``.
 
 - Added a new API's ``get_registered_packages, set_registered_packages`` to
   ``OFS.metaconfigure`` which replace any direct access to

Modified: Zope/trunk/src/Zope2/App/tests/test_startup.py
===
--- Zope/trunk/src/Zope2/App/tests/test_startup.py  2010-06-27 14:02:32 UTC 
(rev 113938)
+++ Zope/trunk/src/Zope2/App/tests/test_startup.py  2010-06-27 14:05:02 UTC 
(rev 113939)
@@ -50,7 +50,7 @@
 
 class StartupTests(ZopeTestCase):
 
-def test_dummy(self):
+def test_database_events(self):
 from Zope2.App.startup import startup
 from zope.component import provideHandler
 from zope.processlifetime import IDatabaseOpened

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/gotcha-LP143531/doc/CHANGES.rst update changelog

2010-06-27 Thread Godefroid Chapelle
Log message for revision 113942:
  update changelog
  

Changed:
  U   Zope/branches/gotcha-LP143531/doc/CHANGES.rst

-=-
Modified: Zope/branches/gotcha-LP143531/doc/CHANGES.rst
===
--- Zope/branches/gotcha-LP143531/doc/CHANGES.rst   2010-06-27 14:16:42 UTC 
(rev 113941)
+++ Zope/branches/gotcha-LP143531/doc/CHANGES.rst   2010-06-27 16:12:02 UTC 
(rev 113942)
@@ -11,6 +11,8 @@
 Bugs Fixed
 ++
 
+- LP #143531: Fix broken object so they give access to their state.
+
 - LP #374818: Use module-provided functions as opposed to the old 
   folder methods when creating folders and user folders in 
   ZopeTestCase.

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/2.12/ LP #143531: Fix broken object so they give access to their state.

2010-06-27 Thread Godefroid Chapelle
Log message for revision 113943:
  LP #143531: Fix broken object so they give access to their state.
  
  merge branch gotcha-LP143531
  

Changed:
  U   Zope/branches/2.12/doc/CHANGES.rst
  U   Zope/branches/2.12/src/OFS/Uninstalled.py
  U   Zope/branches/2.12/src/OFS/tests/test_Uninstalled.py

-=-
Modified: Zope/branches/2.12/doc/CHANGES.rst
===
--- Zope/branches/2.12/doc/CHANGES.rst  2010-06-27 16:12:02 UTC (rev 113942)
+++ Zope/branches/2.12/doc/CHANGES.rst  2010-06-27 16:17:03 UTC (rev 113943)
@@ -11,6 +11,8 @@
 Bugs Fixed
 ++
 
+- LP #143531: Fix broken object so they give access to their state.
+
 - LP #578326: Issue a warning if someone specifies a non-public permission
   attribute in the browser:view directive. This attribute has never been
   supported in Zope 2.

Modified: Zope/branches/2.12/src/OFS/Uninstalled.py
===
--- Zope/branches/2.12/src/OFS/Uninstalled.py   2010-06-27 16:12:02 UTC (rev 
113942)
+++ Zope/branches/2.12/src/OFS/Uninstalled.py   2010-06-27 16:17:03 UTC (rev 
113943)
@@ -22,12 +22,14 @@
 from App.special_dtml import DTMLFile
 from OFS.SimpleItem import Item
 from Persistence import Overridable
+from ZODB.broken import Broken as ZODB_Broken
+from ZODB.broken import persistentBroken
 
 broken_klasses={}
 broken_klasses_lock = allocate_lock()
 LOG = getLogger('OFS.Uninstalled')
 
-class BrokenClass(Explicit, Item, Overridable):
+class BrokenClass(ZODB_Broken, Explicit, Item, Overridable):
 _p_changed=0
 meta_type='Broken Because Product is Gone'
 icon='p_/broken'
@@ -37,12 +39,6 @@
 manage_page_header = Acquired
 manage_page_footer = Acquired
 
-def __getstate__(self):
-raise SystemError, (
-This object was originally created by a product that
-is no longer installed.  It cannot be updated.
-(%s) % repr(self))
-
 def __getattr__(self, name):
 if name[:3]=='_p_':
 return BrokenClass.inheritedAttribute('__getattr__')(self, name)
@@ -74,6 +70,7 @@
 klass.info=(
 'This object\'s class was %s in module %s.' %
 (klass.__name__, klass.__module__))
+klass = persistentBroken(klass)
 LOG.warning('Could not import class %s '
 'from module %s' % (`klass.__name__`, `klass.__module__`))
 finally:

Modified: Zope/branches/2.12/src/OFS/tests/test_Uninstalled.py
===
--- Zope/branches/2.12/src/OFS/tests/test_Uninstalled.py2010-06-27 
16:12:02 UTC (rev 113942)
+++ Zope/branches/2.12/src/OFS/tests/test_Uninstalled.py2010-06-27 
16:17:03 UTC (rev 113943)
@@ -13,7 +13,14 @@
 ##
 
 import unittest
+from OFS.SimpleItem import SimpleItem
+from Testing.ZopeTestCase import base
 
+
+class ToBreak(SimpleItem):
+pass
+
+
 class TestsOfBroken(unittest.TestCase):
 Tests for the factory for broken classes.
 
@@ -77,24 +84,8 @@
 self.assertEqual(klass.__module__, 'Products.MyProduct.MyClass')
 self.assertEqual(klass.product_name, 'MyProduct')
 
-def test_Broken_instance___getstate___raises_useful_exception(self):
-# see http://www.zope.org/Collectors/Zope/2157
-from OFS.Uninstalled import Broken
-from OFS.Uninstalled import BrokenClass
-OID = '\x01' * 8
-
-inst = Broken(self, OID, ('Products.MyProduct.MyClass', 'MyClass'))
-
-try:
-dict = inst.__getstate__()
-except SystemError, e:
-self.failUnless('MyClass' in str(e), str(e))
-else:
-self.fail('__getstate__' didn't raise SystemError!)
-
 def test_Broken_instance___getattr___allows_persistence_attrs(self):
 from OFS.Uninstalled import Broken
-from OFS.Uninstalled import BrokenClass
 OID = '\x01' * 8
 PERSISTENCE_ATTRS = [_p_changed,
  _p_jar,
@@ -119,14 +110,47 @@
 for meth_name in PERSISTENCE_METHODS:
 meth = getattr(inst, meth_name) # doesn't raise
 
+
+class TestsIntegratedBroken(base.TestCase):
+
+def test_Broken_instance___getstate___gives_access_to_its_state(self):
+from Acquisition import aq_base
+from OFS.Uninstalled import BrokenClass
+from OFS.tests import test_Uninstalled
+import transaction
+
+# store an instance
+tr = ToBreak()
+tr.id = 'tr'
+self.app._setObject('tr', tr)
+# commit to allow access in another connection
+transaction.commit()
+# remove class from namespace to ensure broken object
+del test_Uninstalled.ToBreak
+# get new connection that will give access to broken object
+app = base.app()
+inst = aq_base(app.tr)
+

[Zope-Checkins] SVN: Zope/trunk/ LP #143531: Fix broken object so they give access to their state.

2010-06-27 Thread Godefroid Chapelle
Log message for revision 113944:
  LP #143531: Fix broken object so they give access to their state.
  
  merge branch gotcha-LP143531
  

Changed:
  U   Zope/trunk/doc/CHANGES.rst
  U   Zope/trunk/src/OFS/Uninstalled.py
  U   Zope/trunk/src/OFS/tests/test_Uninstalled.py

-=-
Modified: Zope/trunk/doc/CHANGES.rst
===
--- Zope/trunk/doc/CHANGES.rst  2010-06-27 16:17:03 UTC (rev 113943)
+++ Zope/trunk/doc/CHANGES.rst  2010-06-27 16:20:37 UTC (rev 113944)
@@ -6,11 +6,12 @@
 http://docs.zope.org/zope2/releases/.
 
 2.13.0a2 (unreleased)
--
 
 Bugs Fixed
 ++
 
+- LP #143531: Fix broken object so they give access to their state.
+
 - LP #578326: Issue a warning if someone specifies a non-public permission
   attribute in the browser:view directive. This attribute has never been
   supported in Zope 2.

Modified: Zope/trunk/src/OFS/Uninstalled.py
===
--- Zope/trunk/src/OFS/Uninstalled.py   2010-06-27 16:17:03 UTC (rev 113943)
+++ Zope/trunk/src/OFS/Uninstalled.py   2010-06-27 16:20:37 UTC (rev 113944)
@@ -22,12 +22,14 @@
 from App.special_dtml import DTMLFile
 from OFS.SimpleItem import Item
 from Persistence import Overridable
+from ZODB.broken import Broken as ZODB_Broken
+from ZODB.broken import persistentBroken
 
 broken_klasses={}
 broken_klasses_lock = allocate_lock()
 LOG = getLogger('OFS.Uninstalled')
 
-class BrokenClass(Explicit, Item, Overridable):
+class BrokenClass(ZODB_Broken, Explicit, Item, Overridable):
 _p_changed=0
 meta_type='Broken Because Product is Gone'
 icon='p_/broken'
@@ -37,12 +39,6 @@
 manage_page_header = Acquired
 manage_page_footer = Acquired
 
-def __getstate__(self):
-raise SystemError, (
-This object was originally created by a product that
-is no longer installed.  It cannot be updated.
-(%s) % repr(self))
-
 def __getattr__(self, name):
 if name[:3]=='_p_':
 return BrokenClass.inheritedAttribute('__getattr__')(self, name)
@@ -74,6 +70,7 @@
 klass.info=(
 'This object\'s class was %s in module %s.' %
 (klass.__name__, klass.__module__))
+klass = persistentBroken(klass)
 LOG.warning('Could not import class %s '
 'from module %s' % (`klass.__name__`, `klass.__module__`))
 finally:

Modified: Zope/trunk/src/OFS/tests/test_Uninstalled.py
===
--- Zope/trunk/src/OFS/tests/test_Uninstalled.py2010-06-27 16:17:03 UTC 
(rev 113943)
+++ Zope/trunk/src/OFS/tests/test_Uninstalled.py2010-06-27 16:20:37 UTC 
(rev 113944)
@@ -13,7 +13,14 @@
 ##
 
 import unittest
+from OFS.SimpleItem import SimpleItem
+from Testing.ZopeTestCase import base
 
+
+class ToBreak(SimpleItem):
+pass
+
+
 class TestsOfBroken(unittest.TestCase):
 Tests for the factory for broken classes.
 
@@ -77,24 +84,8 @@
 self.assertEqual(klass.__module__, 'Products.MyProduct.MyClass')
 self.assertEqual(klass.product_name, 'MyProduct')
 
-def test_Broken_instance___getstate___raises_useful_exception(self):
-# see http://www.zope.org/Collectors/Zope/2157
-from OFS.Uninstalled import Broken
-from OFS.Uninstalled import BrokenClass
-OID = '\x01' * 8
-
-inst = Broken(self, OID, ('Products.MyProduct.MyClass', 'MyClass'))
-
-try:
-dict = inst.__getstate__()
-except SystemError, e:
-self.failUnless('MyClass' in str(e), str(e))
-else:
-self.fail('__getstate__' didn't raise SystemError!)
-
 def test_Broken_instance___getattr___allows_persistence_attrs(self):
 from OFS.Uninstalled import Broken
-from OFS.Uninstalled import BrokenClass
 OID = '\x01' * 8
 PERSISTENCE_ATTRS = [_p_changed,
  _p_jar,
@@ -119,14 +110,47 @@
 for meth_name in PERSISTENCE_METHODS:
 meth = getattr(inst, meth_name) # doesn't raise
 
+
+class TestsIntegratedBroken(base.TestCase):
+
+def test_Broken_instance___getstate___gives_access_to_its_state(self):
+from Acquisition import aq_base
+from OFS.Uninstalled import BrokenClass
+from OFS.tests import test_Uninstalled
+import transaction
+
+# store an instance
+tr = ToBreak()
+tr.id = 'tr'
+self.app._setObject('tr', tr)
+# commit to allow access in another connection
+transaction.commit()
+# remove class from namespace to ensure broken object
+del test_Uninstalled.ToBreak
+# get new connection that will give access to broken object
+app = base.app()
+inst = aq_base(app.tr)
+

[Zope-Checkins] SVN: Zope/branches/gotcha-LP143531/ merged into 2.12 and trunk

2010-06-27 Thread Godefroid Chapelle
Log message for revision 113945:
  merged into 2.12 and trunk

Changed:
  D   Zope/branches/gotcha-LP143531/

-=-
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/trunk/doc/CHANGES.rst fix broken rst

2010-06-27 Thread Godefroid Chapelle
Log message for revision 113946:
  fix broken rst

Changed:
  U   Zope/trunk/doc/CHANGES.rst

-=-
Modified: Zope/trunk/doc/CHANGES.rst
===
--- Zope/trunk/doc/CHANGES.rst  2010-06-27 16:21:20 UTC (rev 113945)
+++ Zope/trunk/doc/CHANGES.rst  2010-06-27 16:27:37 UTC (rev 113946)
@@ -6,6 +6,7 @@
 http://docs.zope.org/zope2/releases/.
 
 2.13.0a2 (unreleased)
+-
 
 Bugs Fixed
 ++

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/gotcha-LP143531/src/OFS/tests/test_Uninstalled.py actually test the ability to __getstate__

2010-06-19 Thread Godefroid Chapelle
Log message for revision 113651:
  actually test the ability to __getstate__

Changed:
  U   Zope/branches/gotcha-LP143531/src/OFS/tests/test_Uninstalled.py

-=-
Modified: Zope/branches/gotcha-LP143531/src/OFS/tests/test_Uninstalled.py
===
--- Zope/branches/gotcha-LP143531/src/OFS/tests/test_Uninstalled.py 
2010-06-19 15:04:13 UTC (rev 113650)
+++ Zope/branches/gotcha-LP143531/src/OFS/tests/test_Uninstalled.py 
2010-06-19 15:16:30 UTC (rev 113651)
@@ -13,7 +13,14 @@
 ##
 
 import unittest
+from OFS.SimpleItem import SimpleItem
+from Testing.ZopeTestCase import base
 
+
+class ToBreak(SimpleItem):
+pass
+
+
 class TestsOfBroken(unittest.TestCase):
 Tests for the factory for broken classes.
 
@@ -103,18 +110,45 @@
 for meth_name in PERSISTENCE_METHODS:
 meth = getattr(inst, meth_name) # doesn't raise
 
+
+class TestsIntegratedBroken(base.TestCase):
+
 def test_Broken_instance___getstate___gives_access_to_its_state(self):
-from OFS.Uninstalled import Broken
-OID = '\x01' * 8
-inst = Broken(self, OID, ('Products.MyProduct.MyClass', 'MyClass'))
-inst.__setstate__({'x': 1})
-self.assertEqual(inst.__getstate__(), {'x': 1})
+from Acquisition import aq_base
+from OFS.Uninstalled import BrokenClass
+from OFS.tests import test_Uninstalled
+import transaction
 
+# store an instance
+tr = ToBreak()
+tr.id = 'tr'
+self.app._setObject('tr', tr)
+# commit to allow access in another connection
+transaction.commit()
+# remove class from namespace to ensure broken object
+del test_Uninstalled.ToBreak
+# get new connection that will give access to broken object
+app = base.app()
+inst = aq_base(app.tr)
+self.failUnless(isinstance(inst, BrokenClass))
+state = inst.__getstate__()
+self.assertEqual(state, {'id': 'tr'})
+
+# cleanup
+app.manage_delObjects('tr')
+transaction.commit()
+# check that object is not left over
+app = base.app()
+self.failIf('tr' in app.objectIds())
+
+
 def test_suite():
 suite = unittest.TestSuite()
-suite.addTest( unittest.makeSuite(TestsOfBroken))
+suite.addTest(unittest.makeSuite(TestsOfBroken))
+suite.addTest(unittest.makeSuite(TestsIntegratedBroken))
 return suite
 
+
 def main():
 unittest.main(defaultTest='test_suite')
 

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/2.12/src/Products/PageTemplates/ZopePageTemplate.py whitespace

2010-06-16 Thread Godefroid Chapelle
Log message for revision 113521:
  whitespace

Changed:
  U   Zope/branches/2.12/src/Products/PageTemplates/ZopePageTemplate.py

-=-
Modified: Zope/branches/2.12/src/Products/PageTemplates/ZopePageTemplate.py
===
--- Zope/branches/2.12/src/Products/PageTemplates/ZopePageTemplate.py   
2010-06-16 11:47:10 UTC (rev 113520)
+++ Zope/branches/2.12/src/Products/PageTemplates/ZopePageTemplate.py   
2010-06-16 12:06:30 UTC (rev 113521)
@@ -36,7 +36,7 @@
 from OFS.Cache import Cacheable
 from OFS.Traversable import Traversable
 from OFS.PropertyManager import PropertyManager
-from Shared.DC.Scripts.Script import Script 
+from Shared.DC.Scripts.Script import Script
 from Shared.DC.Scripts.Signature import FuncCode
 from webdav.Lockable import ResourceLockedError
 
@@ -52,9 +52,9 @@
 preferred_encodings = ['utf-8', 'iso-8859-15']
 if os.environ.has_key('ZPT_PREFERRED_ENCODING'):
 preferred_encodings.insert(0, os.environ['ZPT_PREFERRED_ENCODING'])
-  
 
 
+
 class Src(Explicit):
  I am scary code 
 
@@ -107,10 +107,10 @@
 security.declareProtected(view_management_screens,
   'read', 'ZScriptHTML_tryForm')
 
-def __init__(self, id, text=None, content_type='text/html', strict=True, 
+def __init__(self, id, text=None, content_type='text/html', strict=True,
  output_encoding='utf-8'):
 self.id = id
-self.expand = 0
   
+self.expand = 0
 self.ZBindings_edit(self._default_bindings)
 self.output_encoding = output_encoding
 # default content
@@ -124,7 +124,7 @@
 def pt_edit(self, text, content_type, keep_output_encoding=False):
 
 text = text.strip()
-
+
 is_unicode = isinstance(text, unicode)
 encoding = None
 output_encoding = None
@@ -163,7 +163,7 @@
preferred_encodings)
 output_encoding = encoding
 
-# for content updated through WebDAV, FTP 
+# for content updated through WebDAV, FTP
 if not keep_output_encoding:
 self.output_encoding = output_encoding
 
@@ -192,7 +192,7 @@
 # The ZMI edit view uses utf-8! So we can safely assume
 # that 'title' and 'text' are utf-8 encoded strings - hopefully
 
-self.pt_setTitle(title, 'utf-8') 
+self.pt_setTitle(title, 'utf-8')
 text = unicode(text, 'utf-8')
 
 self.pt_edit(text, content_type, True)
@@ -227,12 +227,12 @@
 filename = None
 text = file
 else:
-if not file: 
+if not file:
 raise ValueError('File not specified')
 filename = file.filename
 text = file.read()
 
-content_type = guess_type(filename, text)   
+content_type = guess_type(filename, text)
 #if not content_type in ('text/html', 'text/xml'):
 #raise ValueError('Unsupported mimetype: %s' % content_type)
 
@@ -252,9 +252,9 @@
 rows = str(max(1, int(dtpref_rows) + dr))
 cols = str(dtpref_cols)
 if cols.endswith('%'):
-   cols = str(min(100, max(25, int(cols[:-1]) + dc))) + '%'
+cols = str(min(100, max(25, int(cols[:-1]) + dc))) + '%'
 else:
-   cols = str(max(35, int(cols) + dc))
+cols = str(max(35, int(cols) + dc))
 e = (DateTime(GMT) + 365).rfc822()
 setCookie = REQUEST[RESPONSE].setCookie
 setCookie(dtpref_rows, rows, path='/', expires=e)
@@ -294,7 +294,7 @@
 def write(self, text):
 
 if not isinstance(text, unicode):
-text, encoding = convertToUnicode(text, 
+text, encoding = convertToUnicode(text,
   self.content_type,
   preferred_encodings)
 self.output_encoding = encoding
@@ -351,7 +351,7 @@
 self.dav__init(REQUEST, RESPONSE)
 self.dav__simpleifhandler(REQUEST, RESPONSE, refresh=1)
 text = REQUEST.get('BODY', '')
-content_type = guess_type('', text) 
+content_type = guess_type('', text)
 self.pt_edit(text, content_type)
 RESPONSE.setStatus(204)
 return RESPONSE
@@ -369,7 +369,7 @@
 security.declareProtected(view_management_screens, 'html')
 def html(self):
 return self.content_type == 'text/html'
-
+
 security.declareProtected(view_management_screens, 'get_size')
 def get_size(self):
 return len(self.read())
@@ -416,16 +416,16 @@
 
 def __setstate__(self, state):
 # Perform on-the-fly migration to unicode.
-# Perhaps it might be better to work with the 'generation' module 
+# Perhaps it might be better to work with the 'generation' module
 # here?
 _text = state.get('_text')
 if _text 

[Zope-Checkins] SVN: Zope/branches/gotcha-LP143531/ fix LP143531

2010-06-16 Thread Godefroid Chapelle
Log message for revision 113522:
  fix LP143531
  

Changed:
  A   Zope/branches/gotcha-LP143531/

-=-
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/gotcha-LP143531/src/OFS/ use ZODB Broken class to allow access to state

2010-06-16 Thread Godefroid Chapelle
Log message for revision 113523:
  use ZODB Broken class to allow access to state
  

Changed:
  U   Zope/branches/gotcha-LP143531/src/OFS/Uninstalled.py
  U   Zope/branches/gotcha-LP143531/src/OFS/tests/test_Uninstalled.py

-=-
Modified: Zope/branches/gotcha-LP143531/src/OFS/Uninstalled.py
===
--- Zope/branches/gotcha-LP143531/src/OFS/Uninstalled.py2010-06-16 
12:10:05 UTC (rev 113522)
+++ Zope/branches/gotcha-LP143531/src/OFS/Uninstalled.py2010-06-16 
12:12:38 UTC (rev 113523)
@@ -22,12 +22,14 @@
 from App.special_dtml import DTMLFile
 from OFS.SimpleItem import Item
 from Persistence import Overridable
+from ZODB.broken import Broken as ZODB_Broken
+from ZODB.broken import persistentBroken
 
 broken_klasses={}
 broken_klasses_lock = allocate_lock()
 LOG = getLogger('OFS.Uninstalled')
 
-class BrokenClass(Explicit, Item, Overridable):
+class BrokenClass(ZODB_Broken, Explicit, Item, Overridable):
 _p_changed=0
 meta_type='Broken Because Product is Gone'
 icon='p_/broken'
@@ -37,12 +39,6 @@
 manage_page_header = Acquired
 manage_page_footer = Acquired
 
-def __getstate__(self):
-raise SystemError, (
-This object was originally created by a product that
-is no longer installed.  It cannot be updated.
-(%s) % repr(self))
-
 def __getattr__(self, name):
 if name[:3]=='_p_':
 return BrokenClass.inheritedAttribute('__getattr__')(self, name)
@@ -74,6 +70,7 @@
 klass.info=(
 'This object\'s class was %s in module %s.' %
 (klass.__name__, klass.__module__))
+klass = persistentBroken(klass)
 LOG.warning('Could not import class %s '
 'from module %s' % (`klass.__name__`, `klass.__module__`))
 finally:

Modified: Zope/branches/gotcha-LP143531/src/OFS/tests/test_Uninstalled.py
===
--- Zope/branches/gotcha-LP143531/src/OFS/tests/test_Uninstalled.py 
2010-06-16 12:10:05 UTC (rev 113522)
+++ Zope/branches/gotcha-LP143531/src/OFS/tests/test_Uninstalled.py 
2010-06-16 12:12:38 UTC (rev 113523)
@@ -77,24 +77,8 @@
 self.assertEqual(klass.__module__, 'Products.MyProduct.MyClass')
 self.assertEqual(klass.product_name, 'MyProduct')
 
-def test_Broken_instance___getstate___raises_useful_exception(self):
-# see http://www.zope.org/Collectors/Zope/2157
-from OFS.Uninstalled import Broken
-from OFS.Uninstalled import BrokenClass
-OID = '\x01' * 8
-
-inst = Broken(self, OID, ('Products.MyProduct.MyClass', 'MyClass'))
-
-try:
-dict = inst.__getstate__()
-except SystemError, e:
-self.failUnless('MyClass' in str(e), str(e))
-else:
-self.fail('__getstate__' didn't raise SystemError!)
-
 def test_Broken_instance___getattr___allows_persistence_attrs(self):
 from OFS.Uninstalled import Broken
-from OFS.Uninstalled import BrokenClass
 OID = '\x01' * 8
 PERSISTENCE_ATTRS = [_p_changed,
  _p_jar,
@@ -119,6 +103,13 @@
 for meth_name in PERSISTENCE_METHODS:
 meth = getattr(inst, meth_name) # doesn't raise
 
+def test_Broken_instance___getstate___gives_access_to_its_state(self):
+from OFS.Uninstalled import Broken
+OID = '\x01' * 8
+inst = Broken(self, OID, ('Products.MyProduct.MyClass', 'MyClass'))
+inst.__setstate__({'x': 1})
+self.assertEqual(inst.__getstate__(), {'x': 1})
+
 def test_suite():
 suite = unittest.TestSuite()
 suite.addTest( unittest.makeSuite(TestsOfBroken))
@@ -129,4 +120,3 @@
 
 if __name__ == '__main__':
 main()
-

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/gotcha-processlifetime/ integration of zope.processlifetime event

2010-06-16 Thread Godefroid Chapelle
Log message for revision 113524:
  integration of zope.processlifetime event
  

Changed:
  A   Zope/branches/gotcha-processlifetime/

-=-
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/gotcha-processlifetime/src/Zope2/App/startup.py also notify DatabaseOpenedWithRoot

2010-06-16 Thread Godefroid Chapelle
Log message for revision 113529:
  also notify DatabaseOpenedWithRoot

Changed:
  U   Zope/branches/gotcha-processlifetime/src/Zope2/App/startup.py

-=-
Modified: Zope/branches/gotcha-processlifetime/src/Zope2/App/startup.py
===
--- Zope/branches/gotcha-processlifetime/src/Zope2/App/startup.py   
2010-06-16 13:00:14 UTC (rev 113528)
+++ Zope/branches/gotcha-processlifetime/src/Zope2/App/startup.py   
2010-06-16 13:00:50 UTC (rev 113529)
@@ -16,6 +16,7 @@
 from zope.component import queryMultiAdapter
 from zope.event import notify
 from zope.processlifetime import DatabaseOpened
+from zope.processlifetime import DatabaseOpenedWithRoot
 
 from AccessControl.SecurityManagement import newSecurityManager
 from AccessControl.SecurityManagement import noSecurityManager
@@ -134,6 +135,8 @@
 global startup_time
 startup_time = asctime()
 
+notify(DatabaseOpenedWithRoot(DB))
+
 Zope2.zpublisher_transactions_manager = TransactionsManager()
 Zope2.zpublisher_exception_hook = zpublisher_exception_hook
 Zope2.zpublisher_validated_hook = validated_hook
@@ -206,7 +209,7 @@
 else:
 error_log_url = log.raising((t, v, traceback))
 
-if (REQUEST is None or 
+if (REQUEST is None or
 (getattr(REQUEST.get('RESPONSE', None), '_error_format', '')
  != 'text/html')):
 raise t, v, traceback
@@ -264,8 +267,8 @@
 REQUEST['AUTHENTICATED_USER'] = AccessControl.User.nobody
 
 try:
-result = f(client, REQUEST, t, v, 
-   traceback, 
+result = f(client, REQUEST, t, v,
+   traceback,
error_log_url=error_log_url)
 if result is not None:
 t, v, traceback = result

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


Re: [Zope-dev] RFC: Proposed new style for documenting and testing ZTK packages

2010-04-18 Thread Godefroid Chapelle
On 17/04/10 23:20, Tres Seaver wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Jim Fulton wrote:

snip


 - I can almost guarantee that any examples that aren't tested will be
 wrong. I tried to do a good job on the bobo docs.  I made almost all
 of the examples executable, and the ones I didn't had an amazing
 tendency to have bugs.

 I'm not against having the snippets be executable, because I *do* want
 them to work.  I just don't want to encourage anyone to think that they
 are testing the software when they write the snippets, or execute them.

I second Martin: the sentence hereunder is worth its weight in gold.

(I wonder if this is an appropriate use of the translation of French 
valoir son pesant d'or)

Executing the snippets is testing the documentation, not the software.


 - I agree that tests should be separate from documentation. You can
 get some of your coverage from the docs, but you'll need tests for
 edge cases and details not addressed by the docs.

 I would actually prefer to measure coverage (objectively) without
 reference to the snippets in the docs.

I think this would make a lot of sense.

 Having *all* the tests for a
 module in one place helps think more clearly about getting good
 coverage, both from the lines executed standpoint (which can be
 objectively measured) and from the semantics enforced standpoint,
 which can't.
 
 
  Tres.

With both unit and doc testing, we can get full lines executed coverage.

Because of the insulation enforced by our unit testing framework, this 
can lead to better semantic coverage than with the dependent tests we 
write when doc testing.

One of the reason that full lines executed coverage does not translate 
to full semantics coverage is the presence of class attributes. In 
fact, those attributes are holding sub-global state that multiplies 
the number of combinations that should be tested.

I slowly have come to the idea that class attributes can be as bad as 
global variables : they allow hidden dependencies between methods. This 
is an insidious problem as class attributes look better until you are 
told other.

A good sign that this problem is creeping in is when you need to write 
complex setup in order to write method tests.

In other words, unit testing can be seen as a way of being warned early 
of too many attributes in our classes.

PS: Hereabove, I speak only of the insulated semantics of each class. 
This does not remove the need for integration tests which *try* to test 
all interactions between those classes.
-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be

___
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] Zope2 - Release Manager

2010-03-31 Thread Godefroid Chapelle
On 31/03/10 17:07, Tres Seaver wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hanno Schlichting wrote:

snip



 I'm planning to make a 2.12.4 release on Easter Monday (April 5). You
 have until then to ask questions and complain :)

 An enthusiastic +1 from me:  I think you are an ideal candidate for the job.


 Tres Seaver

Same enthusiastic support and thanks from me !

-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be

___
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] Summary of this weeks' meeting (2010-03-30)

2010-03-31 Thread Godefroid Chapelle
On 31/03/10 17:17, Christian Theune wrote:
 The meeting summaries have been found useful, although the participants of the
 IRC meetings suspect that those developers that could not join may find them
 even more useful. Feedback from the mailinglist (hey, are you reading this?)
 would be welcome.

I am reading them ! And pleased that the meetings happen.

Thanks Christian

-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be
___
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] Agenda for today's IRC meeting (3pm UTC on #zope)

2010-03-18 Thread Godefroid Chapelle
On 16/03/10 14:28, Christian Theune wrote:

snip

 Horizon
 ---

 These items are currently tracked on the horizon. We won't discuss them
 at this meeting, but we'll get to them at some point:

 - Test runners / nightly builds
- Volunteer for coordinating automated builds
- Towards a list of projects/platforms/etc. we want guaranteed builds
  for
- Automatic binary egg builds for Windows
- Access to Windows (2003) build machines for developers (Baiju M.)

 - Bug tracking / working on bugs regularly

 - How do we deal with proposed API changes and Python 3 compatibility?
(Lennart Regebro)

 - Pondering *some* (re-)structuring of the ZTK to allow for better
maintenance/release management/communication/marketing. (Chris
McDonough)

 Hope to see you in about 90 minutes,
 Christian

As far as I know, Zope 2 has no release manager since Andreas retired 
after so many years of hard work.

I think there is a need for a new release manager.

Is that question part of the horizon of the IRC meetings ?
Or is it processed elsewhere ?

Thanks for taking the time of leading those meetings.

-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be
___
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] lovely.remotetask

2010-02-05 Thread Godefroid Chapelle
Hi,

Jean-Francois Roche and I need to port lovely.remotetask to Zope 2.
We have started to look at the existing branch port-for-zope210.
In order to clean the branch, we made a buildout to run its tests.

Doing this, we found out that lovely.remotetask has some ui components 
that depends heavily on zope.app.

We would like to refactor the package into two packages :

The first one would hold backend components and would depend on zope.app 
as little as possible.  (z3c.remotetask.core)

The second one would hold the ui components. (z3c.remotetask.browser)

We would also refactor lovely.remotetask to depend on the new packages.

Comments welcome.

PS: Lovely people, do you mind that the new packages would move to z3c 
namespace iow that it looses the lovely namespace ?
-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be
___
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] Stepping back as Zope 2 release manager

2010-01-11 Thread Godefroid Chapelle
On 11/01/10 17:19, Andreas Jung wrote:
 Hi there,

 I would like to inform you that I intent to retreat from the Zope 2
 release manager position soon. I have been serving the Zope community in
 this position for almost seven years and now it is time to move on and
 hand
 over the responsibility to some other person. The reasons for stepping
 down
 are pretty easy: I am too busy with other things and I would like to
 shift my
 focus on other Zope-related projects but I will remain part of the
 Zope and
 Plone community.

 The Zope community has no official process for choosing a new release
 manager so
 I assume some volunteer has to speak up or someone may suggest a
 honorable person
 of the Zope community for the position.


 Regards,
 Andreas

Andreas, you made more than great work ! Thanks a lot.

Has the Zope Foundation any will of leading the process to choose a new 
release manager ?
-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be
___
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] zope.schema

2009-12-22 Thread Godefroid Chapelle
On 22/12/09 15:09, Hanno Schlichting wrote:
 On Mon, Dec 21, 2009 at 12:01 PM, Godefroid Chapelle
 got...@bubblenet.be  wrote:
 Jean-Francois and I made a few improvements to zope.schema.

 Would it be possible to get a new release ?

 You have a new 3.6.0 release up on PyPi.

 Hanno

Thanks !

-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be

___
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] zope.schema

2009-12-22 Thread Godefroid Chapelle
On 22/12/09 17:23, Hanno Schlichting wrote:
 On Tue, Dec 22, 2009 at 5:21 PM, Godefroid Chapellegot...@bubblenet.be  
 wrote:
 On 22/12/09 15:09, Hanno Schlichting wrote:
 On Mon, Dec 21, 2009 at 12:01 PM, Godefroid Chapelle
 got...@bubblenet.bewrote:
 Jean-Francois and I made a few improvements to zope.schema.

 You have a new 3.6.0 release up on PyPi.

 I also made the required changes in all the other Zope Toolkit
 packages to the new testing output, released new versions of them all
 and updated the ZTK.

 Merry x-mas :)
 Hanno

This is a nice x-mas gift ! Thanks for the work. I had overlooked fixes 
needed in other packages.

Is there a buildout you can point me at so that next time I get warned 
and do those fixes myself ?

Regards
-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be
___
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] zope.schema

2009-12-22 Thread Godefroid Chapelle
On 22/12/09 17:55, Hanno Schlichting wrote:
 On Tue, Dec 22, 2009 at 5:33 PM, Godefroid Chapellegot...@bubblenet.be  
 wrote:
 On 22/12/09 17:23, Hanno Schlichting wrote:
 I also made the required changes in all the other Zope Toolkit
 packages to the new testing output, released new versions of them all
 and updated the ZTK.

 This is a nice x-mas gift ! Thanks for the work. I had overlooked fixes
 needed in other packages.

 Is there a buildout you can point me at so that next time I get warned and
 do those fixes myself ?

 We only have a buildbot testing the ZTK itself. The ZTK does not track
 SVN trunk or the latest release of all its packages. Instead it
 tracks a defined list of versions of these packages, which are known
 to work together.

 It's definition lives at svn+ssh://svn.zope.org/repos/main/zopetoolkit/trunk

 So if you want to be nice, you check and build out that location. Make
 your changes to the package you are working on, stick it into that
 buildout as a develop egg and run all tests for all packages via
 bin/test-ztk.

 If all tests for all packages pass, you can release a new version of
 the package and update the ztk.cfg in the buildout to point to that
 release.

 I frequently do that the other way around, where I first release new
 versions of packages, then update the ztk.cfg locally. Run the tests
 and if errors in other packages come up, fix those, make new releases
 of those, and repeat the dance.

 The important rule is, that the SVN trunk of the ztk.cfg will at all
 times give a test-failure free configuration. But as a contributor to
 an individual package, you are not required to care about the ZTK as a
 whole. You can contribute to one of them, without all the overhead.
 Other people like me have an interest in maintaining the ZTK and will
 do so.

 Cheers,
 Hanno

Thanks for all details. I dunno if this is documented somewhere else.
If it is not, where could that be added to help newcomers ?

-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be
___
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] zope.schema

2009-12-21 Thread Godefroid Chapelle
Hi,

Jean-Francois and I made a few improvements to zope.schema.

Would it be possible to get a new release ?

Or to give us access on Pypi so that we can make it ourselves ?

Thanks
-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be
___
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] the ZCA API decision

2009-12-03 Thread Godefroid Chapelle
Martijn Faassen wrote:
 Hi there,
 
 I think we've had enough discussion to make a decision. Hopefully 
 everybody is at least reasonably happy with this:
 
 An adapt() method will be added to Interface. It takes the objects to 
 adapt as *args, and optional but explicit 'default' and 'name' aguments.
 
 A utility() method will be added to Interface. It takes optional but 
 explicit 'default' and 'name' arguments.
 
 On the adapter hook (__call__) we will deprecate the implicit second 
 argument for defaults, with a deprecation warning. Instead, we will 
 require people to write out 'default=' explicitly. Otherwise its 
 behavior remains unchanged. I think we can motivate this change purely 
 because IFoo(bar, baz) really is quite surprising compared to IFoo(bar, 
 default=baz).

I tried to follow this discussion closely: however, I cannot say that I 
understand if doing multi-adaptation with IFoo(bar, baz, boo) has been 
rejected or postponed.

 [steering group members, if you are really unhappy with this, please 
 speak up now. Silence is assent. :)]
 
 Hopefully we can move forward towards implementation.
 
 Thomas Lotze, are you happy enough with this to still help with the 
 implementation?
 
 Thanks everybody for your participation in the discussion!
 
 Regards,
 
 Martijn


-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be
___
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] implementing zope.component 4.0

2009-12-01 Thread Godefroid Chapelle
Fred Drake wrote:
 On Tue, Dec 1, 2009 at 11:34 AM, Martin Aspeli optilude+li...@gmail.com 
 wrote:
 I think
 that logically, these are two different concepts that meet two different
 sets of use cases.
 
 Agreed here.  This is essential to this discussion.
 
 I've been quite surprised that there are so many who argue to unify these 
 ideas.
 
 
   -Fred
 

Agreed here as well.

I think that the different intentions of

1) lookup by interface in registry and

2) adaptation

will be easier to understand if the code patterns are different as well.



Because I doubt tuple adaptation is that frequent, I am for

 5) Call the interface for adaption, and something else for utility
 lookup, with tuples for multi-adaptation.

where the something else is 'Interface.getUtility()'.

This way we can

- make the interface more prominent when doing lookups (and have some 
sort of symmetry between lookup and adaptation)

- and simultaneously keep the semantic difference between adaptation and 
lookup.

-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be
___
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] zope.testing 3.8 fails in mysterious ways

2009-08-12 Thread Godefroid Chapelle
Marius Gedminas wrote:
 On Mon, Aug 03, 2009 at 01:17:41PM +0200, Andreas Zeidler wrote:
 just fyi: the bug is also present in zope.testing 3.7.7 (showing up when 
 testing plone.z3cform).  would it perhaps be possible to release a fixed 
 3.7.8 soon, so that our buildout stops complaining again? :)
 
 I looked at the bug and Godefroid's checkin today.  Things seem to be
 complicated.  Short summary: collective.recipe.z2testrunner doesn't
 support running tests in a subprocess.  Long summary:
 https://launchpad.net/bugs/407916
 
 As a quick workaround, instead of a single 'run tests' step that does
 
   bin/test
 
 do separate 'run unit tests' and 'run functional tests' steps
 
   bin/test -u
   bin/test -f
 
 in your buildbot config.
 
 Marius Gedminas
 


I did fix zope.testing and plone.recipe.zope2instance :

http://mail.zope.org/pipermail/checkins/2009-August/036807.html

https://dev.plone.org/collective/changeset/94328/buildout/plone.recipe.zope2instance/trunk/src

Fixes released in zope.testing 0.8.1 and plone.recipe.zope2instance 3.4


-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be
___
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.testing 3.8 fails in mysterious ways

2009-07-31 Thread Godefroid Chapelle
Sidnei da Silva wrote:
 On Thu, Jul 30, 2009 at 9:33 PM, Martin Aspelioptilude+li...@gmail.com 
 wrote:
 Unfortunately, I've got other packages that depend on a newer
 zope.testing (specifically, collective.testcaselayer). But I thought
 zope.testing aimed to be able to run any valid tests, so it sounds
 like a bug in zope.testing regardless, at least since every other test
 I've run in the same instance work fine.
 
 The traceback you pasted shows an UnboundLocalError. What about
 looking at the source and figuring out why that local variable is not
 defined?
 
 -- Sidnei

I bumped into the same bug while working on the same package...

I allowed myself to add the missing assignment.
However, I'd like someone to check over my shoulder.
http://mail.zope.org/pipermail/checkins/2009-July/036586.html

Further, this bug is triggered by another one happening when running 
tests with buildout in plone.z3cform current trunk (r102411).

The test runner is trying to spawn a subprocess with the --resume-layer 
argument.  However, the --resume-layer argument is not accepted by the 
subprocess.

This produces an error in a format not foreseen by the error parser. 
(which then triggered the UnboundLocalError).

It would be nice if someone with a better understanding of the 
testrunner could take a look and understand why the --resume-layer stuff 
happens. Christian ?

-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be
___
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] [Fwd: Zope Tests: 4 OK, 2 Failed]

2008-12-04 Thread Godefroid Chapelle
Tres Seaver wrote:

 
 As an aside / vent:  the reason for the now-removed EXTERNALS.txt files
 was to keep the canonical information about the externals in a diffable
 file:  why subversion can't do a proper diff on its own line-oriented
 property is beyond me.  Another benefit of an EXTERNALS.txt file was
 that it could be inspected in the web view of a directory, which isn't
 true for the svn:externals property itself.
 
 
 Tres.

I want to support this. The noise made by keeping EXTERNALS.txt in svn 
is very low compared to the signal it provides.

-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be
___
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: [Repoze-dev] Somebody needs to talk at EuropPython.

2008-05-06 Thread Godefroid Chapelle

Lennart Regebro wrote:

So, we need talks at EuropPython about both Repoze and Grok. I can't
go, but I want to make sure *somebody* does. :)
Hands up: Who is talking about Grok, and who talks about Repoze? :)

Other super-cool Zope technologies that should be talked about?



I think Lennart is really hitting a nail here. We need to advertize 
about our great efforts.


I wont be in EuroPython even if I would have spoken about it with pleasure.

--
Godefroid Chapelle (aka __gotcha) http://bubblenet.be
___
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] Help raise Open Source visibility in the government area

2007-09-06 Thread Godefroid Chapelle

Hi,

( If you have already received this email and have voted, thank you ! )
( If you have not voted, and wanted to, this is a nice reminder. )
( If you do not wish to vote, sorry for the noise. )

Please take 10 minutes to help raise open source profile in the 
government area by voting for the PloneGov project at the european egov 
awards.


See below what PloneGov is and why you could vote to support open source 
even if you do not use Plone.


Anyone from any country can vote, you don't have to live in the EU.
And please vote *now*, the deadline is almost upon us **SEPTEMBER 7** — 
you are likely to forget if you don't set aside 10 minutes now.


This process is unfortunately a bit involved — since
we're dealing with governments — but shouldn't take longer than 10
minutes to complete. Step-by-step:


1. Go to http://www.epractice.eu/register

2. Wait for the email confirmation and log in.

3. Fill out your profile:
   http://www.epractice.eu/myprofile/personal
   http://www.epractice.eu/myprofile/professional
   http://www.epractice.eu/myprofile/contact
   (If you don't want to provide professional info, we suggest you add
I just want to vote in the required fields)

4. Vote for PloneGov by clicking here:
http://www.epractice.eu/do/voteinspiring/1026

Thanks!

More information below, if you're interested in what PloneGov is.

_

What is PloneGov?

PloneGov aims to create a collaborative software ecosystem where
governmental organizations work together, in close relationship with
SMEs, to share the cost of software development and enhanced
capabilities. This new initiative started by small towns now reaches
all levels of public administration and spans over 13 countries on 3
continents.
http://www.plonegov.org

Your vote for the Most innovative good practice award is a unique
opportunity to reach politicians and decision makers. Winning this
award will highlight the maturity achieved by the Open Source
collaborative model as a pragmatic way to tackle IT challenges in
society. You may vote until Friday, September 7th.

The Public Sector has an important influence on many sectors of
society. A wider Open Source acceptance in this field is strategic to
all Open Source users and advocates. Users in sectors such as
Education, NGOs and businesses would directly benefit from broader
adoption. It would result in a growing pool of available software,
tools, and developers.

Beyond the practical example of PloneGov, your vote contributes to
support Open Source values that are based on collaboration, openness
and fair trade. It is an opportunity to support Open Source as an
innovative model of IT development in which the Public Sector, NGOs
and Education can work together and all of society will benefit.

--
Godefroid Chapelle (aka __gotcha)- BubbleNet  http://bubblenet.be

___
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] Strange traceback or Error in the traceback ?

2006-01-16 Thread Godefroid Chapelle

Hi,

While seaching for objects of all types containing some text through the 
ZMI find tab, I got the traceback hereunder. (Zope 2.7.8-final on

windows)

Traceback (innermost last):
  Module ZPublisher.Publish, line 101, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 39, in call_object
  Module Shared.DC.Scripts.Bindings, line 306, in __call__
  Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
  Module App.special_dtml, line 175, in _exec
  Module DocumentTemplate.DT_With, line 61, in render
  Module DocumentTemplate.DT_Util, line 198, in eval
   - __traceback_info__: _
  Module string, line 0, in ?
  Module OFS.FindSupport, line 151, in ZopeFind
  Module OFS.FindSupport, line 151, in ZopeFind
  Module OFS.FindSupport, line 113, in ZopeFind
  Module OFS.Image, line 425, in PrincipiaSearchSource
AttributeError: content_typestartswith

I went to the code and found the following :

def PrincipiaSearchSource(self):
 Allow file objects to be searched.

if self.content_type.startswith('text/'):
return str(self.data)
return ''

IOW, the traceback is really strange.

Anybody with a clue ?

--
Godefroid Chapelle (aka __gotcha)http://bubblenet.be

___
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: find ZClasses instances

2006-01-02 Thread Godefroid Chapelle

Dieter Maurer wrote:

Godefroid Chapelle wrote at 2005-12-30 17:34 +0100:

Hi, I get to a setup where ZClasses could still be used : one ZClass is 
installed in one of the product.


I need to find out if there are any instance of the ZClass in the ZODB 
in order to migrate them to sthing saner.


I have tried to use the manage_findResult method, passing it the ZClass 
name as meta_type. I got no result. But I am not sure the ZClass name is 
its meta_type.



I think, it uses the ZClass name as meta_type.

However, you can easily verify: create a ZInstance and look at
its ZMI page. What you see in the upper left corner below
the tabs is the meta_type.



Thanks for a creative suggestion !

...and thanks for the time spent answering questions from many of us on 
this list and others.


--
Godefroid Chapelle (aka __gotcha)- BubbleNet  http://bubblenet.be

___
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] find ZClasses instances

2005-12-30 Thread Godefroid Chapelle
Hi, I get to a setup where ZClasses could still be used : one ZClass is 
installed in one of the product.


I need to find out if there are any instance of the ZClass in the ZODB 
in order to migrate them to sthing saner.


I have tried to use the manage_findResult method, passing it the ZClass 
name as meta_type. I got no result. But I am not sure the ZClass name is 
its meta_type.


Any hint how to find out if there are instances of a specific ZClass in 
a ZODB ?


Thanks  
--
Godefroid Chapelle (aka __gotcha)- BubbleNet  http://bubblenet.be

___
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: Zope Foundation - formation review committee

2005-09-25 Thread Godefroid Chapelle

Rob Page wrote:

We've been asked to share the membership of the
committee we have helping with the formation documents
for the Zope Foundation.

We're grateful to the following people for sharing
their valuable time to participate:

o Takeshi Yamamoto, CEO, Zope Japan KK
o Jan Smith, OzZope
o Jean-Marc Orliaguet, Chalmers University/CPSSkins
o Kit Blake, CEO, Infrae
o Christian Theune, CEO, Gocept and DZUG
o Eric Barroca, Managing Partner, Nuxeo
o Hadar Pedhazur, Chairman, Zope Corp
o Rob Page, CEO, Zope Corp
o Rajesh Setty, Chairman, Cignex
o Dan Ravicher, Legal Director, Software Freedom law Cnter

Regards,
Rob



Thanks to Hadar and Rob to have published this.

I am pleased to be able to get directly to people to ask about what is 
going on.


--
Godefroid Chapelle (aka __gotcha)- BubbleNet  http://bubblenet.be

___
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: Zope Foundation?

2005-09-24 Thread Godefroid Chapelle

Hadar Pedhazur wrote:
  Godefroid Chapelle wrote:
 
  Can the name of people that are part of this small committee be
  published ? I'd like to know who might be representing me, this way I
  can ask him or them about the direction taken and maybe actually give
  them my opinion.
 
 
  I don't think this should be a problem, but I'll have to check with Rob
  first, and then the people on the committee, to make sure they don't
  mind being contacted. After all, they are volunteering their time, and
  they might not want the extra burden of communicating with many
  individuals.
 
  Still, this is a good idea, so I will float it early next week.

Has there been any steps made about this ?

snip
--
Godefroid Chapelle (aka __gotcha)- BubbleNet  http://bubblenet.be

___
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: Zope Foundation?

2005-09-17 Thread Godefroid Chapelle

Hadar Pedhazur wrote:

Andreas Jung wrote:


What is the current status of the ZF?



The process is proceeding swiftly, and hopefully smoothly. We have draft 
documents of the TM Agreement and the By-Laws, and are well along the 
way to drafts of the IP Policy and the remaining documents.


We have formed a small committee of some representative groups in the 
Zope community, cutting across interests and geography, and we have IRC 
meetings to make sure that at the highest level, the initial documents 
will represent a broad community interest.


Can the name of people that are part of this small committee be 
published ? I'd like to know who might be representing me, this way I 
can ask him or them about the direction taken and maybe actually give 
them my opinion.




Before the actual formation of the Foundation, we will post all of the 
relevant documents for public comment, so those that are not on the 
current committee will still get a chance to weigh in before the By-Laws 
(for example) become final. 
Even after that, the Membership can alter 
the By-Laws in the future, so this is just the starting point.




This is clear.

However, the starting point will be much more constructive if most 
members of the community that the Foundation claims willing to serve 
would have a chance to give their opinion on the bylaws as early as 
possible.


This would avoid that the persons currently working in the small 
committee feel personally attacked when one of us dislikes or disagrees 
about some of the points and makes it known loudly... after a lot of 
hard work has already been done.


It's still quite possible that everything will be wrapped up by the end 
of October (as originally projected), but we did have the delay in 
starting (more on that below) and there's still a lot to do, so it could 
slip a bit, but we certainly are doing everything in our power to make 
that date.




Ill finish with my usual recall that english is not my mothertongue and 
that it implies that I could be misusing some words without knowing 
about it.


snip

--
Godefroid Chapelle (aka __gotcha)  http://bubblenet.be

___
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: Zope Foundation Update

2005-07-28 Thread Godefroid Chapelle

Hi Christian,

Thanks for this long and balanced post.

Far less heated than I (or other hot people of the community) can produce.

I hope ZC will take time to answer your legitimate questions...

I suppose you'll await some progress on the negotiation before joining 
us in ZEA...


BTW, do you have the feeling ZEA was trying to steal anything, have you 
heard of others that would think we tried to ?


At least I agree ZEA should have communicated with ZC far earlier.

Christian Scholz wrote:

Hi!

Andrew Milton wrote:

You took someone else's work and claimed it as your own. This is the worst crime 
you can commit in the Open Source world. 




I think it's not really a discussion about Open Source here as it should
make no difference to the Zope community whether ZC or ZEA is holding
the TM. Both don't represent it and both possibly could do harm to it if
they just wanted to (which they don't want as I see it).


Thanks mainly for this paragraph... which ZEA itself would agree with, 
at least if I understand their(our) position correctly.



snip
--
Godefroid Chapelle (aka __gotcha)  http://bubblenet.be

___
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: Zope Foundation Update

2005-07-20 Thread Godefroid Chapelle

Andreas Jung wrote:



--On 20. Juli 2005 12:43:22 +0100 Matt Hamilton [EMAIL PROTECTED] 
wrote:



  ZEA's registration represents an abuse of registration
  and management of international trademarks and the
  misappropriation of a mark that is clearly the property
  of Zope Corporation.

So why is Zope Foundation being used as a pawn in the corporate
strategies of Zope Corporation? I find this unclear intent pretty
disconcerting.




Why did not ZEA came up with such arguments against the ZF *much earlier*?


Speaking for me, I felt asking this type of questions suspecting ZC to 
found ZF for its own sake would not have helped.


Having a Foundation is a major step if we can manage to have it built 
community-oriented.


If you remember well, I did ask some questions about the tone of the IRC 
chat which I did not feel as an opened discussion : rather I felt it as 
a suite of questions/answers about things that were presented like facts.


I had the feeling that my reaction was already misunderstood my some of 
the attendants. So I did not even think of speaking of the trademark 
question... which had striked me as one of the critical points : IIRC, 
the TM was the first thing mentioned in ZC longer explanation.


The ZF proposal is out since some weeks. There was meanwhile an IRC chat 
with Rob,  a lengthy discussion on the mailing list and Rob spoke at 
Europython. I can not remember having heard any objections from ZEA 
against this proposal. I have not heard any public statements of Paul 
Everitt at Europython during the ZF presentation *against* the ZF.


There is nothing against the ZF : there is sthing against ZC being the 
sole owner of the TMs when the current value of it has been established 
by the community as a whole, especially out of USA.


This is why I support the proposal made by a few members of the 
community to have the ZF own the TMs and that would give a perpetual 
license to Zope Corporation to use it.


For instance,

...it would be far better for everyone if Zope Corporation were 
instead to transfer the trademark to the foundation and receive a 
perpetual/irrevocable/etc. license back.


posted by webmaven on plope.org

see

http://plope.org/Members/chrism/namechange/talkback/1120068594/discussionitem_view



Speaking as independent developer - neither representing the interests 
of ZC nor of ZEA - I find these behind-the-curtain negotiations 
extremely counterproductive from the community point of view and 
definitely not in the sense of the Zope community.


-aj


It's definitely better to speak about it in the open air, where we all 
will be able to think about it together.


Disclaimer : I'd like to remind english-only-speaking readers that my 
mothertongue is french not english. IOW, some of my words may need to be 
explained rather than taken literally.

--
Godefroid Chapelle (aka __gotcha)- BubbleNet  http://bubblenet.be

___
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: ZpdfDocument

2005-06-13 Thread Godefroid Chapelle

Fernando Lujan wrote:

Hi,

Are someone developing some Product like ZpdfDocument? Today, If I
need a pdf file, I use the reporlab lib, and write it from scratch...
A better solution exist?

Thanks and Regards.

You could also take a look at CMFReportTool. 
(http://svn.plone.org/view/collective/CMFReportTool/)


I have used it recently in a project and the code is imho really nice 
(the PDF generation code does not depend on CMF).


A nice aspect is the generation of PDF from PML (XML description of 
ReportLab objects). This allows you to easily define your PDFs with ZPTs.


HTH

--
Godefroid Chapelle (aka __gotcha)  http://bubblenet.be

___
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: Five within Zope 2.8 - really cool !

2005-04-14 Thread Godefroid Chapelle
Martijn Faassen wrote:
Andreas Jung wrote:
I just would like to thank everyone working on the Five integration
with Zope 2.8. It's really easy and fun to work with views, view
classes, adapters and interfaces in a Zope 2 environment. I've always
tried to get around Zope 3 somehow but now I am at the point where I
am really convinced and healed :-) It was a good decision to ship
Five now instead in Zope 2.9 or so. I am sure Five will make Z2
application design a lot more  straight forward and
cleaner...thanks...great work.

Thanks on behalf of the Five developers and integrators! That's very 
nice to hear, especially coming from you!

Regards,
Martijn
Andreas,
Getting thanks from someone deeply involved in the everyday work of the 
Zope maintenance is a pleasure.

And a good opportunity to thank YOU for the work done on 2.x release 
management.

Godefroid
PS: I am a bit late on this, was on holiday...
___
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] ZConfig keys

2004-08-04 Thread Godefroid Chapelle
Hello,
I would like to confirm that ZConfig keys are case insensitive and
that the corresponding attributes on the config object returned by the 
'loadConfig' call are always lower case.

The only thing that seems relevant about keys and case sensitivity in 
the documentation does not state it explicitely :

'''When this schema is loaded, a set of defaults for the derived section 
type is computed. Since basic-key
is case-insensitive (everything is converted to lower case), foo and 
Foo are both converted to foo,
which clashes since key only allows one value for each key.'''

Thanks
--
Godefroid Chapelle (aka __gotcha)http://bubblenet.be
___
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 )


[Zope-dev] Re: Streaming large files

2004-07-09 Thread Godefroid Chapelle
Thilo Staebler wrote:
hi!
I have to stream large mpeg-files over http with range support. this 
works quite nice until the client seeks in the (media)player and the 
files aren't to large, because zope caches the whole file...
...so each seek means streaming the whole file from the requested 
position till end *g*
- my RESPONSE object doesn't even know, that the player has seeked e.g. 
back to the beginning...
is there a way to bypass the zope caching? and how do I know if the 
player has disconnected, so I can stop streaming?

thanks in advance
thilo
You may want to take a look at Railroad project from Infrae.
http://infrae.com/products/railroad/
--
Godefroid Chapelle (aka __gotcha)http://bubblenet.be
___
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 )


[Zope-dev] Re: zope-dev list policies

2004-06-25 Thread Godefroid Chapelle
Tres Seaver wrote:
Leonardo Rochael Almeida wrote:
On Mon, 2004-06-21 at 11:59, Casey Duncan wrote:
-1 on changing the list policy. I read and post to all of the public
lists through Gmane, which won't work if the policy is changed.

I might be wrong but I think this is incorrect. From the headers of this
message you sent it's possible to see that you sent it thru gmane, yet
the From: address is your zope.com address, so you should not have a
problem posting thru the list this way.

I think you got a direct reply (but could be wrong).  I got the original 
mail bounced to me just now.

Tres.
This surprises me.
I am administring plone-i18n mailing list. Non members cannot post. I 
always post through gmane and my messages get accepted !

Further, I think Mohsen has a very good point when he mentions the fact 
that spam pollutes the archives !

IOW, I think we really could make advantage of Non-members not allowed 
on zope lists.

--
Godefroid Chapelle (aka __gotcha)http://bubblenet.be
___
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 )


[Zope-dev] Re: Zope 3 Newsletter 11

2003-12-24 Thread Godefroid Chapelle
Gary Poster wrote:

GODEFROID CHAPELLE: Page Template usage variable

  Usage in Page templates has been completed during the Rheinland
  Sprint organized by DZUG.
I should have asserted that only the infrastructure for the usage 
variable has been completed.

Now, it's time to :

1) walk the zope3 tree and evolve all pages that depend on another 
template that the main template.

2) evolve the main template to allow it to be used in all the cases in 1)

3) improve the main template, as we will have only one to maitain

--
Godefroid Chapelle (aka __gotcha)http://bubblenet.be


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


[Zope-dev] Re: Still i18n:attributes DeprecationWarning on Zope head!

2003-09-19 Thread Godefroid Chapelle
At 13:24 17/09/2003, Chris Withers wrote:
I know that, the error message is fine, but there are tests that need to 
be corrected. Since you know this syntax very well, please can you check 
out the Zope HEAD, search for tal:attributes and fix and broken tests? I 
think there are only a few files that need to be changed...
Done

cheers,

Chris
--

Godefroid Chapelle

BubbleNet sprl
rue Victor Horta, 18 / 202
1348 Louvain-la-Neuve
Belgium
Tel + 32 (10) 459901

TVA 467 093 008
RC Niv 49849
___
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 )


[Zope-dev] Re: i18n:attributes in 2.7

2003-07-25 Thread Godefroid Chapelle
Godefroid Chapelle wrote:


To summarize, as message ids translation for attributes was added, 2.7 
and 3 are working according to the doc/spec,
but 2.7 breaks backward compatibility to 2.6.1.

This leads to the following question : do we (1) accept this rupture in 
i18n:attributes management or do we (2) want 2.7 to cover space 
separated attributes ?

IOW, could people that need backward compatibility stand up ?
Plone 1.1 needs backwards compatibility.
Plone guys would like not to have to maintain two versions for 2.6 and 2.7
This implies that we need to implement the second possibility : 2.7 must 
accept space separated attributes.

BTW, second choice would lead us to a bad situation where we cannot 
discriminate between

span value=value title=title
i18n:attributes=value title /
and

span value=value title=title
i18n:attributes=title msgtitle /
Quoting Jim on #zope3-dev :

ok, then I suggest:
In the case where there are other than 2, there is no ambiguity
If there is a semicolon, then use the new rule
foo title; - title is message id
so if there are two things: foo bar
if *bar* is an attr, then:
Translate it and issue a depreication warning using the warnings module
if *bar* if not an attr:
Treat it as a message id.
IOW

if space separated and there are more than two items,
all are treated as attributes plus deprecation warning
if space separated and two items :

- i18n:attributes=value msg_id; (with semicolon) will always be 
treated as attr msg_id

- i18n:attributes=value title will be treated as attr attr as long 
as title exist as attribute plus deprecation warning

--
Godefroid Chapelle
BubbleNet sprl
rue Victor Horta, 18 / 202
1348 Louvain-la-Neuve
Belgium
Tel + 32 (10) 459901

TVA 467 093 008
RC Niv 49849


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


[Zope-dev] Re: [Vote] PEP308 voting began

2003-03-06 Thread Godefroid Chapelle
Evan Simpson wrote:
Guido van Rossum wrote:

IMO TALES should solve this for itself by introducing an if/then/else
expression form rather than depending on Python.  If you can have a
not:.. expression, surely you can have an if:..:then:..:else:..
expression.


Now that you point it out, it's not even hard.  Here's a 
proof-of-concept, with really awful parsing (it obviously breaks on 
nested if: then: else:), that actually works:

class IfExpr:
def __init__(self, name, expr, compiler):
self._s = expr = expr.lstrip()
m = re.match('(.*) then:(.*) else:(.*)', expr)
if m is not None:
condexpr, thenexpr, elseexpr = m.groups()
self._cond = compiler.compile(condexpr)
self._then = compiler.compile(thenexpr)
self._else = compiler.compile(elseexpr)
def __call__(self, econtext):
if econtext.evaluateBoolean(self._cond):
return econtext.evaluate(self._then)
return econtext.evaluate(self._else)
(Tested with
div tal:replace=if:options/x then:string:yes else:string:no)
Is this worth a robust implementation, ZPT folks?
I think so. Iam much too often using python:test( just for simple 
condition testing.
Cheers,

Evan @ 4-am


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


[Zope-dev] cvs.zope.org broken

2002-12-18 Thread Godefroid Chapelle
Hi all,

Does someone knows what happens with cvs.zope.org which is currently broken ?

Thanks
--

Godefroid Chapelle

BubbleNet sprl
rue Victor Horta, 18 / 202
1348 Louvain-la-Neuve
Belgium

Tel + 32 (10) 459901
Mob + 32 (477) 363942

TVA 467 093 008
RC Niv 49849


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope )


[Zope-dev] Zope 2.5.1 on Win Me

2002-06-14 Thread Godefroid Chapelle

Hi all,

I have been using Zope from 2.2.4 on Linux, Win 95 and  Win 2K, never 
experiencing any problems.

I am trying to convince a potential colleague to try and learn Zope.

He installed 2.5.1 on Win Me. When he begins with start.bat the machine is 
totally blocked after few seconds. The only exit is to reboot the machine.

I deinstalled 2.5.1 and installed 2.3.3 on the same machine which works 
perfectly.

But I still would like to know if you have heard any similar problems with 
Millenium (I have searched NIP archives on Millenium and did not find 
anything).

I have no idea how to trace the problem.

Thanks

--

Godefroid Chapelle

BubbleNet sprl
rue Victor Horta, 18 / 202
1348 Louvain-la-Neuve
Belgium

Tel + 32 (10) 459901
Mob + 32 (477) 363942

TVA 467 093 008
RC Niv 49849



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Re: Zope-Dev digest, Vol 1 #1682 - 11 msgs

2002-05-10 Thread Godefroid Chapelle

At 06:13 10/05/2002, [EMAIL PROTECTED] wrote:
'else' is tricky within the block oriented structure of anything XML-ish,
because of the concept of 'well-formedness'.  The 'if' statement would have
to be singly wrapped, and the else block wrapped separately, looking at
least somewhat awkward any way you go about it.  The best I can come up with
in my mind is this, in order to have the 'else' pick up on the condition
expressed in its surrounding container.  But, yuck:

if ...
  true stuff
  else
   false stuff
  /else
/if


A good page template way is something like this:

tal:if condition=myTalesExpression
  truth
/tal:if
tal:else condition=not:myTalesExpression
  false
/tal:else

The 'not' TALES namespace is valuable.  The downside is that you evaluate
the expression twice.  A good way to work within this is something that I
did earlier today, outside of this conversation, where I evaluate an
expression earlier and assign it to a variable:

div id=edit-area
  tal:define=editItems python:here.getMenuItem(...)

   h3Edit Menu Items/h3
   form action=Delete method=post name=actForm
 tal:condition=editItems

  ... (form and table elements, and a loop over editItems
   contained in here if there were results) ...

   /form

   div class=emph
tal:condition=not:editItems
No menu items available
   /div

/div


This is something I did a lot in DTML too, setting a search result to either
a global variable, or inside of a large dtml-let namescape


It is maybe not clear that the above is really usable and allowed. I do not 
know how and where to stress that the tal: marked tags are underdocumented 
what a pity.

I have already tried : 
http://www.zope.org/Documentation/ZopeBook/AdvZPT.stx#3-44

Sorry that I am not able to explain it better...
--

Godefroid Chapelle

BubbleNet sprl
rue Victor Horta, 18 / 202
1348 Louvain-la-Neuve
Belgium

Tel + 32 (10) 459901
Mob + 32 (477) 363942

TVA 467 093 008
RC Niv 49849



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Re: [Zope] Security Assertions

2002-01-17 Thread Godefroid Chapelle

At 18:43 16/01/2002, you wrote:

Sorry about cross-posting but I think the following info is worth reading 
for both zope-users and developers.


Note that up until Zope 2.5.0b4 there is a bug in the way module security 
assertions are handled that makes it impossible to declare more than one 
assertion without overwriting a previous assertion.  It's not really a 
security hole, it's just annoying and clearly broken.  I'd suggest that 
you complain about this (or do it yourself) if you think a monkeypatch is 
in order for Zope 2.3/2.4.

I went to CVS and read AccessControl.SecurityInfo.py

The code looked simple enough that I would take no risk by including it 
even if my understanding of the inner-working of Zope is still elementary.

The following patch works to correct the problem for Zope 2.3.3. It does 
not seem to cause any other problem.

# patch taken from Zope 2.5
from string import rfind  # 1.5.2 syntax

def ModuleSecurityInfo(module_name=None):
 if module_name is not None:
 modsec = _moduleSecurity.get(module_name, None)
 if modsec is not None:
 return modsec
 dot = rfind(module_name, '.') # 1.5.2 syntax
 if dot  0:
 # If the module is in a package, recursively make sure
 # there are security declarations for the package steps
 # leading to the module
 modname = module_name[dot + 1:]
 pmodsec = ModuleSecurityInfo(module_name[:dot])
 if not pmodsec.names.has_key(modname):
 pmodsec.declarePublic(modname)
 return _ModuleSecurityInfo(module_name)

class _ModuleSecurityInfo(SecurityInfo):
 Encapsulate security information for modules.


in place of

class ModuleSecurityInfo(SecurityInfo):
 Encapsulate security information for modules.


I do not know what you mean by a 'monkeypatch' but it is certainly worth it 
to add the patch to 2.3.x and 2.4.x branches.




Godefroid Chapelle wrote:

   Casey Duncan wrote:
  
So the following things don't work:
   
from Products.Formulator.Form import FormValidationError
  
   Either Martijn or you need to add the following lines to a Product
   __init__.py somewhere:
  
   from AccessControl import ModuleSecurityInfo
   ModuleSecurityInfo('Products').declarePublic('Formulator')
   ModuleSecurityInfo('Products.Formulator').declarePublic('Form')
   
 ModuleSecurityInfo('Products.Formulator.Form').declarePublic('FormValidationError') 

  
   Cheers,
  
   Evan @ Zope

I added the above code in the corresponding  __init__.py on my machine.
Which works almost perfectly...:
Further, I needed to be able to import :
from Products.gvibDA.gvib.gvibExceptions import IntegrityError

So I added the following code in gvibDA's __init__.py
from Products.PythonScripts.Utility import allow_module, allow_class
from AccessControl import ModuleSecurityInfo, ClassSecurityInfo
from Globals import InitializeClass
ModuleSecurityInfo('Products').declarePublic('gvibDA')
ModuleSecurityInfo('Products.gvibDA').declarePublic('gvib')
ModuleSecurityInfo('Products.gvibDA.gvib').declarePublic('gvibExceptions')
ModuleSecurityInfo('Products.gvibDA.gvib.gvibExceptions').declarePublic('IntegrityError')
 

from gvib.gvibExceptions import IntegrityError
allow_class(IntegrityError)

I get an 'Unauthorized: Formulator' error when accessing a script 
beginning with
from Products.Formulator.Form import FormValidationError
from Products.gvibDA.gvib.gvibExceptions import IntegrityError

I suppose it has something to do with the creation of two instances of 
ModuleSecurityInfo('Products') but have no idea how to correct the problem.
Any help would be appreciated.

--

Godefroid Chapelle
BubbleNet sprl
rue Victor Horta, 18 / 202
1348 Louvain-la-Neuve
Belgium
Tel + 32 (10) 459901
Mob + 32 (477) 363942
TVA 467 093 008
RC Niv 49849

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )



--

Godefroid Chapelle

BubbleNet sprl
rue Victor Horta, 18 / 202
1348 Louvain-la-Neuve
Belgium

Tel + 32 (10) 459901
Mob + 32 (477) 363942

TVA 467 093 008
RC Niv 49849


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] CoreSessionTracking onStart

2001-10-24 Thread Godefroid Chapelle

Hi,

I am trying to use the onStart method of a session data manager

But I do not get how to give the path so that my method get called...

I could not find any information of the real way to use it.

Can someone help me ?

Thanks



--

Godefroid Chapelle

BubbleNet sprl
rue Victor Horta, 30
1348 Louvain-la-Neuve
Belgium

Tel + 32 (10) 457490
Mob + 32 (477) 363942

TVA 467 093 008
RC Niv 49849


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] ComputedAttribute, Persitent and too many datafull baseclasses

2001-10-20 Thread Godefroid Chapelle

Hi,

In a product I am writing, I am trying to add a ComputedAttribute to an 
instance of a Folder descendant class.

This is the code I use:

 def addComputedAttribute(self, attributeName, sourceCode):
 methodName = '_ca_get%s' % attributeName
 self.addMethod(methodName, sourceCode)
 setattr(self, attributeName, 
ContextComputedAttribute(self.__class__.__dict__[methodName]))

where at first I defined ContextComputed Attribute like this:

 import ComputedAttribute

 _ComputedAttribute = ComputedAttribute.ComputedAttribute
 del ComputedAttribute

 class ContextComputedAttribute(_ComputedAttribute):
 pass


This put the Folder in a bad state : when I access it later, the Zope 
instance crashes.

So I supposed I needed to use a persistent Attribute and I tried with 
ContextComputedAttribute class defined like this:

 class ContextComputedAttribute(Persistent):
 def __init__(self, test):
 pass


In this case, the Folder stays in a good state but it does not fullfill the 
requirements as ContextComputedAttribute does not descend from the real 
Zope ComputedAttribute class.

My problem is the following :

I cannot define a class like this:

 import ComputedAttribute

 _ComputedAttribute = ComputedAttribute.ComputedAttribute
 del ComputedAttribute

 class ContextComputedAttribute(_ComputedAttribute, Persistent):
   pass

In this case, I get the following error

TypeError: too many datafull base classes

which has to do with too many ExtensionClass derivation...

Can someone tell me how to define a class with both ComputedAttribute and 
Persistent behaviours ?

Thanks a lot.


--

Godefroid Chapelle

BubbleNet sprl
rue Victor Horta, 30
1348 Louvain-la-Neuve
Belgium

Tel + 32 (10) 457490
Mob + 32 (477) 363942

TVA 467 093 008
RC Niv 49849


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] hack for refused authorization with virtual dataskin

2001-04-23 Thread Godefroid Chapelle

Hello,


After rereading the ZopeSecurityPolicy source code, I tried the
following hack.

I add in the skinscript :

WITH 1 COMPUTE __allow_access_to_unprotected_subobjects__=RESULT

which does work : it fools the security mechanism.

I can live with it but feel that there is only a slight problem which
could allow me to avoid the hack.

I hope this can hint some of you to help me to understand what is badly
settled in my installation.



--

Godefroid Chapelle

BubbleNet sprl
rue Victor Horta, 30
1348 Louvain-la-Neuve
Belgium

Tel 010 457490
Mob 0477 363942

TVA 467 093 008
RC Niv 49849



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Virtual dataskinned ZClass instance

2001-04-18 Thread Godefroid Chapelle



Steve Alexander a crit :

 Godefroid Chapelle wrote:

 
  where getNames is a python method in a DataSkin Class Extender.
  It is defined as :
 
   import string
   list = string.split(context.id, '_')
   return list[1]

 use getId() perhaps?

 --

 Steve Alexander

When using context.getId(), I get the id of the specialist, not of the
HumanClass instance...

Actually, what I present is a "toy test" where I try to access the id as you
do in the skinscript exapmle you sent me...


If I change the skinscript to something simpler...

WITH 'test' COMPUTE prenom=RESULT


and the DTML to :

dtml-var standard_html_header
h2dtml-var title_or_id/h2
dtml-var "defaultRack.getItem('100_Peter').prenom"
dtml-var standard_html_footer


I get the same unauthorized error response but this time when accessing
'prenom'.

I suppose ther something wrong with the default ZClass constructor which is
used by the rack to make the instance... but is that correct ... no idea...

--

Godefroid Chapelle

BubbleNet sprl
rue Victor Horta, 30
1348 Louvain-la-Neuve
Belgium

Tel 010 457490
Mob 0477 363942

TVA 467 093 008
RC Niv 49849



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Dataskin with no persistence.

2001-04-12 Thread Godefroid Chapelle

Hi,

I am trying to build a specialist which gives me access to a facade
ZClass in front of a XML file.

As the XML is already stored, I do not want to store the facade ZClass.
Actually, I would like it to be a base on which
the skinscript of the specialist's rack can add attributes.

So I created a ZClass (HumanClass) with no properties inheriting from
ZObject and _ZClass_for_DataSkin.

I create a specialist in which the default rack has the following
properties :

data plug-in : a skinscript computing attributes based on an id and the
xml.

storage :
   Class to use for stored items: HumanClass
   Objects are: loaded by accessing attribute nom  (which is defined in
the skinscript)

Store 'persistent' data: Directly in this object


I store no HumanClass instance and try to get an instance :

specialist.getItem(anId)

I always get None.


Am I trying to do something impossible because of lack of understanding
or am I just wrong in one property of ZClass, Specialist, Rack ?


Thanks a lot


--

Godefroid Chapelle

BubbleNet sprl
rue Victor Horta, 30
1348 Louvain-la-Neuve
Belgium

Tel 010 457490
Mob 0477 363942

TVA 467 093 008
RC Niv 49849



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Dataskin with no persistence.

2001-04-12 Thread Godefroid Chapelle



Steve Alexander a crit :

 Godefroid Chapelle wrote:

 
  data plug-in : a skinscript computing attributes based on an id and the
  xml.
 

I just want to stress that I deleted every prebuilt other data plugins...

My ZClass has only an empty dataskin property sheet.


  storage :
 Class to use for stored items: HumanClass
 Objects are: loaded by accessing attribute nom  (which is defined in
  the skinscript)
 

I have changed the load attribute to id.

This helps a little : with dtml-var "getItem(REQUEST.id)" in the
specialist, I get a HumanClass Instance at xxx in the HTML code.

But when trying to access any attribute of the instance I get an
authorization error.

I remembered having seen somewhere to put a proxy role on the skinscript so I
tried.

With manager, I keep the same authorization error...

With owner or anonymous, I get a NameError on the first name mentioned in the
skinscript...


  Store 'persistent' data: Directly in this object
 
 
  I store no HumanClass instance and try to get an instance :
 
  specialist.getItem(anId)
 
  I always get None.
 
 
  Am I trying to do something impossible because of lack of understanding
  or am I just wrong in one property of ZClass, Specialist, Rack ?

 What you're doing sounds about right.

 What does your SkinScript look like?

 In the ScinScript, you need to determine what data to use based on
 self.id. Here's the SkinScript I use for a similar function; I'm
 creating "virtual" instances of one ZClass, based on instances of a
 different ZClass from another Specialist. In this case, the other
 specialist is "Responses".

 WITH Responses.get_data_for_code(code=self.id) COMPUTE
subject_name,
rater_name,
relationship_name,
response_code,
process_step

 --
 Steve Alexander
 Software Engineer
 Cat-Box limited

BTW Has there been a patch for an error I get when using copy or cut buttons
in ZPatterns containers :

Zope Error

   Zope has encountered an error while publishing this resource.

   Error Type: KeyError
   Error Value: manage_tabs


--

Godefroid Chapelle

BubbleNet sprl
rue Victor Horta, 30
1348 Louvain-la-Neuve
Belgium

Tel 010 457490
Mob 0477 363942

TVA 467 093 008
RC Niv 49849



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



  1   2   >