[Zope-dev] Re: [Zope 2.11] Stepping forward and going beta

2007-12-28 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hanno Schlichting wrote:
 Hanno Schlichting wrote:
 Andreas Jung wrote:

 The only thing I'm going to do if no one objects is to deprecate calling
 the ViewPageTemplateFile in Five without passing in the view. This
 should at least allow us to merge the aq-branch without any problems for
 Zope 2.13 if noone can think of a way around the problem.
 
 I tried to implement this, but stumbled over too many places where code
 is not complying to interfaces and thus passing in an argument breaks code.

That indicates a lack of test coverage:  classes which claim to implment
interfaces on behalf or their instances need tests (via
'zope.interface.verify.verifyClass').

 For example the IContentProvider interface requires the render method to
 be def render(*args, **kwargs). Almost no viewlet is complying to this
 starting with the base viewlet manager
 zope.viewlet.manager.ViewletManagerBase which accepts no arguments.
 Passing in the view to the render method therefor doesn't work (render
 is often directly the template).

Let's just fix the viewlet classes, then.

 As a result I have abandoned this plan as well. Maybe someone can think
 of a different solution for merging or going forward with the
 aq_vs_parent branch.


Tres.
- --
===
Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHdSIx+gerLs4ltQ4RAu6CAJ9ddQNCKB3gOoFYX1x4jdujjh/FtACg2b5m
c8kMc363Ys2GMOUUCJn57+Y=
=8rzL
-END PGP SIGNATURE-

___
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: [Zope 2.11] Stepping forward and going beta

2007-12-27 Thread Hanno Schlichting
Hanno Schlichting wrote:
 Andreas Jung wrote:
 
 The only thing I'm going to do if no one objects is to deprecate calling
 the ViewPageTemplateFile in Five without passing in the view. This
 should at least allow us to merge the aq-branch without any problems for
 Zope 2.13 if noone can think of a way around the problem.

I tried to implement this, but stumbled over too many places where code
is not complying to interfaces and thus passing in an argument breaks code.

For example the IContentProvider interface requires the render method to
be def render(*args, **kwargs). Almost no viewlet is complying to this
starting with the base viewlet manager
zope.viewlet.manager.ViewletManagerBase which accepts no arguments.
Passing in the view to the render method therefor doesn't work (render
is often directly the template).

As a result I have abandoned this plan as well. Maybe someone can think
of a different solution for merging or going forward with the
aq_vs_parent branch.

Hanno

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


Re: [Zope-dev] Re: [Zope 2.11] Stepping forward and going beta

2007-12-26 Thread Christophe Combelles

Philipp von Weitershausen a écrit :
individual eggs as well. The KGS [1] maintained by Stephan Richter 
provides you with a list of the most recent releases 



[1] http://download.zope.org/zope3.4/versions.cfg


Hi Stephan, could you please update the KGS to include zope.app.locales 3.4.1 ?

Christophe
___
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: [Zope 2.11] Stepping forward and going beta

2007-12-23 Thread Philipp von Weitershausen

Andreas Jung wrote:
--On 18. Dezember 2007 21:53:55 +0100 Hanno Schlichting 
[EMAIL PROTECTED] wrote:



Andreas Jung wrote:

the Zope 2.11 beta phase has been delayed for while. The reason for
holding but the release was Philipps and Hannos work on the

http://svn.zope.org/Zope/branches/philikon-aq/

branch. Unfortunately both can't work (lack of personal time) on the
branch and finish it in the feature. So I propose to release Zope 2.11
beta 1
by the end of the year w/o this branch. Zope 2.11 would contain the Zope
3.4 and ZODB 3.8 with blob support as major new features.

Objections? Thoughts?


+1 btw. Is there an ETA for beta1?


During x-mas and new year..likely around December 29th. If you need some 
more days, let me know but I would like to push the beta 1 release asap.


Note that doing a beta isn't just releasing the branch as it is. You 
should update all externals to the current 3.4.x releases of the 
individual eggs as well. The KGS [1] maintained by Stephan Richter 
provides you with a list of the most recent releases (except that the 
latest ZODB 3.8.0 candidate [2] isn't in it, apparently)


Also please be careful not to add or remove packages arbitrarily from 
the externals. If I remember correctly, a while back somebody just 
copied the externals from the Zope 3 tree to Zope 2 and added a bunch of 
not-releasable software to Zope 2 and removed other stuff in the process.



[1] http://download.zope.org/zope3.4/versions.cfg
[2] http://cheeseshop.python.org/pypi/ZODB3/3.8.0c1
___
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: [Zope 2.11] Stepping forward and going beta

2007-12-23 Thread Andreas Jung

Thanks for pointing this out. I think I need to work on a script
to generate the textfiles for the externals in Zope 2 automatically
from the KGS :-

Happy x-mas,
Andreas

--On 23. Dezember 2007 22:17:10 +0100 Philipp von Weitershausen 
[EMAIL PROTECTED] wrote:



Andreas Jung wrote:

--On 18. Dezember 2007 21:53:55 +0100 Hanno Schlichting
[EMAIL PROTECTED] wrote:


Andreas Jung wrote:

the Zope 2.11 beta phase has been delayed for while. The reason for
holding but the release was Philipps and Hannos work on the

http://svn.zope.org/Zope/branches/philikon-aq/

branch. Unfortunately both can't work (lack of personal time) on the
branch and finish it in the feature. So I propose to release Zope 2.11
beta 1
by the end of the year w/o this branch. Zope 2.11 would contain the
Zope 3.4 and ZODB 3.8 with blob support as major new features.

Objections? Thoughts?


+1 btw. Is there an ETA for beta1?


During x-mas and new year..likely around December 29th. If you need some
more days, let me know but I would like to push the beta 1 release asap.


Note that doing a beta isn't just releasing the branch as it is. You
should update all externals to the current 3.4.x releases of the
individual eggs as well. The KGS [1] maintained by Stephan Richter
provides you with a list of the most recent releases (except that the
latest ZODB 3.8.0 candidate [2] isn't in it, apparently)

Also please be careful not to add or remove packages arbitrarily from the
externals. If I remember correctly, a while back somebody just copied the
externals from the Zope 3 tree to Zope 2 and added a bunch of
not-releasable software to Zope 2 and removed other stuff in the process.


[1] http://download.zope.org/zope3.4/versions.cfg
[2] http://cheeseshop.python.org/pypi/ZODB3/3.8.0c1




--
ZOPYX Ltd.  Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376
Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535
Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK

E-Publishing, Python, Zope  Plone development, Consulting


pgpRCngOT8sV8.pgp
Description: PGP signature
___
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: [Zope 2.11] Stepping forward and going beta

2007-12-18 Thread Hanno Schlichting
Andreas Jung wrote:
 the Zope 2.11 beta phase has been delayed for while. The reason for
 holding but the release was Philipps and Hannos work on the
 
 http://svn.zope.org/Zope/branches/philikon-aq/
 
 branch. Unfortunately both can't work (lack of personal time) on the
 branch and finish it in the feature. So I propose to release Zope 2.11
 beta 1
 by the end of the year w/o this branch. Zope 2.11 would contain the Zope
 3.4 and ZODB 3.8 with blob support as major new features.
 
 Objections? Thoughts?

+1 btw. Is there an ETA for beta1?

The only thing I'm going to do if no one objects is to deprecate calling
the ViewPageTemplateFile in Five without passing in the view. This
should at least allow us to merge the aq-branch without any problems for
Zope 2.13 if noone can think of a way around the problem.

Hanno

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


Re: [Zope-dev] Re: [Zope 2.11] Stepping forward and going beta

2007-12-18 Thread Andreas Jung



--On 18. Dezember 2007 21:53:55 +0100 Hanno Schlichting 
[EMAIL PROTECTED] wrote:



Andreas Jung wrote:

the Zope 2.11 beta phase has been delayed for while. The reason for
holding but the release was Philipps and Hannos work on the

http://svn.zope.org/Zope/branches/philikon-aq/

branch. Unfortunately both can't work (lack of personal time) on the
branch and finish it in the feature. So I propose to release Zope 2.11
beta 1
by the end of the year w/o this branch. Zope 2.11 would contain the Zope
3.4 and ZODB 3.8 with blob support as major new features.

Objections? Thoughts?


+1 btw. Is there an ETA for beta1?


During x-mas and new year..likely around December 29th. If you need some 
more days, let me know but I would like to push the beta 1 release asap.




The only thing I'm going to do if no one objects is to deprecate calling
the ViewPageTemplateFile in Five without passing in the view. This
should at least allow us to merge the aq-branch without any problems for
Zope 2.13 if noone can think of a way around the problem.


2.13? That's science fiction :-)

Andreas


--
ZOPYX Ltd.  Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376
Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535
Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK

E-Publishing, Python, Zope  Plone development, Consulting


pgpTRekg0mcme.pgp
Description: PGP signature
___
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: [Zope 2.11] Stepping forward and going beta

2007-12-09 Thread Hanno Schlichting
Sidnei da Silva wrote:
 On Dec 9, 2007 5:30 AM, Andreas Jung [EMAIL PROTECTED] wrote:
 Objections? Thoughts?
 
 That branch didn't look like it was far off being finished. Is there a
 TODO of what is pending to finish it?

The good news is that all Zope tests are passing and all the heavy
lifting is done. The bad news is that there is one rather nasty minor
problem with the branch.

Now we were able to remove Acquistion wrapping and base classes from a
lot of places in Five. In almost all places this would cause no problem,
and following __parent__ pointers instead would do the trick. The only
place where this turned out to be tricky is the ViewPageTemplateFile aka
ZopeTwoPageTemplateFile of Five (found in
Products.Five.browser.pagetemplatefile).

The main difference between the Zope3 and the former Zope2 version is
the way those get to know the view which they operate on. In Zope3 the
view is always passed in as the first argument to the __call__ method,
the argument is called instance here.

The Zope2 version so far depended on Acquisition to get to the view. As
we removed Acquisition wrapping from a lot of places, the
ViewPageTemplateFile doesn't have any proper AQ context anymore to work
with. For most cases this isn't a problem as the view is passed in as
the first argument as well in Zope2, but looking through the Plone
codebase (which we used as a real-life testcase for interesting uses of
Five technology) it turned out that there are various different ways of
usage out there, which wouldn't pass in the view. Those do work right
with current Zope and obviously need to keep working for BBB reasons.

The only way I found to get this working without reintroducing
AQ-wrapping all over the place again, which kind of defeats the purpose
of this branch, is to walk up the stack frames to get to the view. I
hacked this version just yesterday and it still produces some
TraversalError for 'macros' in some cases. If you want to test this,
just create a Plone instance from the Plone 3 SVN branch, try
inline-editing on the front-page, @@manage-portlets, creating a new
content-rule inside the control panel and looking at the mail control
panel. These all use ViewPageTemplateFiles in various different ways and
so far I haven't been able to get all of them working at the same time.

Hanno

P.S. If you want to see my latest attempt at writing horrible code, this
is the new __call__ method for Five's ViewPageTemplateFile:

def __call__(self, *args, **keywords):
instance = None
# Ensure that the first argument is the instance
if len(args)  0:
instance, args = args[0], args[1:]
if not IBrowserView.providedBy(instance):
# The first arg is not the desired instance. Put the first
# argument back into the list.
args = list(args)
args.insert(0, instance)
instance = None

# XXX! This isn't a particular nice way to get the instance.
def _acquireInstance():
instance = None
for i in range(2, 7):
instance = sys._getframe(i).f_locals['self']
if IBrowserView.providedBy(instance):
break
return instance

if instance is None:
instance = _acquireInstance()

# Copied the code from zope.app.pagetemplate as we need to pass on
# the keywords which might contain one named 'instance', which would
# conflict with the first required arg of that method. KSS does this
# as an example and needs instance to be present in the options.
# TODO: Maybe we should emit a warning for the instance keyword.
namespace = self.pt_getContext(
request=instance.request,
instance=instance, args=args, options=keywords)
debug_flags = instance.request.debug
s = self.pt_render(
namespace,
showtal=getattr(debug_flags, 'showTAL', 0),
sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0),
)
response = instance.request.response
if not response.getHeader(Content-Type):
response.setHeader(Content-Type, self.content_type)
return s

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