[Zope-dev] Re: Proposal: Merge philikon-aq branch into Zope trunk

2008-04-26 Thread Hanno Schlichting

Hanno Schlichting wrote:

Hanno Schlichting wrote:
I'd like to propose to merge the philikon-aq branch into Zope trunk 
aka Zope 2.12.


[...]


Timeline:

I would like to do the merge as soon as possible, so people can easily 
test it against all their applications and report back problems.


This branch is merged now. Death to Acquisition, long live Zope!

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

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Proposal: Merge philikon-aq branch into Zope trunk

2008-04-22 Thread Hanno Schlichting

Hi.

Hanno Schlichting wrote:
I'd like to propose to merge the philikon-aq branch into Zope trunk aka 
Zope 2.12.


[...]


Timeline:

I would like to do the merge as soon as possible, so people can easily 
test it against all their applications and report back problems.


Just as a note for those interested: I'm working on this now, but ran 
into some merge problems which took more time to figure out than I had 
this weekend. I'll continue ASAP. Stay tuned ;)


Hanno

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

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Proposal: Merge philikon-aq branch into Zope trunk

2008-04-19 Thread Philipp von Weitershausen

Martijn Faassen wrote:

Tres Seaver wrote:
[snip]
The second problem that might arise, is that the implicit assumption 
that every object inside Zope 2 inherits from Acquisition base 
classes no longer holds. Code that relies on the various aq_* 
attributes to be there need to be adjusted to use the Acquisition 
methods instead.


The major downside here is that restricted code doesn't have access to
the required functions ('aq_inner', 'aq_parent', 'aq_acquire'), and
hence use the attributes.  ('aq_base' should not be allowewd at all, as
it strips away security context).

There are probably thousands (or even tens of thousands) of templates
and scripts "in the wild" which use these attributes.  I don't think we
can break them in a single release:  we need to deprecate them first
(with suitalbe logging output), and maybe even provide
'__parent__'-aware workarounds / fallbacks in their implementations.


I'm trying to understand what is proposed that would break them. All 
existing content objects will continue to use acquisition. Only things 
like Five views will stop using acquisition and switch to a __parent__ 
pointer. I doubt there are that many scripts that rely on getting a 
.aq_parent, say, on a Five view. There will be view code that relies on 
this, so I imagine we expect that should be rewritten to use the 
functions instead, but not scripts.


You're right, and Tres acknowledged that in a follow-up post already :). 
What's more, views actually *do* have those aq_* attributes for BBB, so 
even those scripts that do view.aq_parent will continue to work no 
problem. See my answer to Tres's post.


If we were to change OFS so that it'd start using __parent__ then I can 
see where you're coming from, but I don't think anyone's proposing that?


Nope. And it would be quite an involved thing to do, because currently 
Zope 2 objects have no persistent reference to their parent whatsoever 
(in fact, parent i.e. cyclic references used to be unsupported by early 
ZODB versions). So basically, if you wanted to introduce __parent__ 
pointers to existing Zope 2 objects, you'd have to traverse the whole 
object tree and set them based on their acquisition parent. I *suppose* 
this could be done ad-hoc (when you first traverse over an object that 
doesn't yet have its __parent__ pointer set), but I'd rather not think 
this through right now.


So, like I said, it's not on my list, and I bet it won't be for a long 
time. Mostly because a) it's probably unnecessary and b) much code in 
fact relies on content being of the type Acquisition.Implicit... 
 anyone? :)

___
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: Proposal: Merge philikon-aq branch into Zope trunk

2008-04-18 Thread Chris McDonough

Martin Aspeli wrote:

Hanno Schlichting wrote:

Philipp von Weitershausen wrote:

Hanno Schlichting wrote:
Merging it into Zope trunk will get it into the Zope 2.12 release 
which is at this point not scheduled yet, but is unlikely to get a 
release before early 2009. This should give us plenty of time to test.
This sounds good. Here's another idea, though: In accordance with 
"release early and often", how about scheduling the 2.12 release 
shortly after the 2.11 one? So the only "new" thing in 2.12 would be 
the philikon-aq branch (it would still ship with the same Zope 3 
libraries as 2.11, etc.).


I suspect we want to do something about the eggification story of Zope 
2 for Zope 2.12 as well. Figuring out the approach and documenting it 
might take some additional time. I don't see that releasing another 
Zope 2.13 shortly after 2.12 makes a lot of sense.


Why don't we get started on that, too, then?

I think eggification of Zope 2 is relatively easy, and most of the 
necessary R&D has already been done. In fact, a lot of the eggs exist 
already.


I wonder if Philipp would be amenable to writing a proposal on this, and 
get Chris McDonough's input.


IMO, a Zope2 egg release should depend on the following packages:

- 'ZODB3' (already packaged)

- 'transaction' (depended on by newer ZODBs)

- 'ZConfig' (also depended on by newer ZODBs)

- 'StructuredText' (should be broken out into its own egg)

- 'docutils' (should use existing egg)

- 'mechanize' (should use existing egg)

- 'pytz' (should use existing egg)

- all zope.* packages (properly pinned) that zope2 depends on

The actual top-level egg that depends on these things would contain all the 
other packages depended on by Zope 2 (e.g. DateTime, Missing, Products/*, 
Acquisition, ExtensionClass, ZPublisher, ZServer, etc).  We might call it 
'zope2libs'.  What needs to get worked out is the ability to share headers 
between ZODB and this package so things can compile properly.


- C

___
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: Proposal: Merge philikon-aq branch into Zope trunk

2008-04-18 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Philipp von Weitershausen wrote:
> Tres Seaver wrote:
>>> The second problem that might arise, is that the implicit assumption 
>>> that every object inside Zope 2 inherits from Acquisition base classes 
>>> no longer holds. Code that relies on the various aq_* attributes to be 
>>> there need to be adjusted to use the Acquisition methods instead.
>> The major downside here is that restricted code doesn't have access to
>> the required functions ('aq_inner', 'aq_parent', 'aq_acquire'), and
>> hence use the attributes.  ('aq_base' should not be allowewd at all, as
>> it strips away security context).
>>
>> There are probably thousands (or even tens of thousands) of templates
>> and scripts "in the wild" which use these attributes.  I don't think we
>> can break them in a single release:  we need to deprecate them first
>> (with suitalbe logging output), and maybe even provide
>> '__parent__'-aware workarounds / fallbacks in their implementations.
> 
> Here's the deal:
> 
> * Instances of (subclasses of) Acquisition.Implicit and .Explicit still 
> have those aq_* attributes. So basically all content objects still have 
> them, no change there.
> 
> * Five's BrowserView class doesn't inherit from Acquisition.Explicit 
> anymore, but we've provided the aq_* attributes for backward 
> compatibility. So if a template does view/aq_parent, it will still work 
> (we have tests for this). We haven't set an expiry date for this BBB, 
> nor are we logging a warning. We probably should, though, if we 
> eventually want to phase out Five's BrowserView class.
> 
> 
> So, off the line there's no backward-compatibility problem. Now if 
> people decide to implement their content objects without Acquisition 
> (which they now can), then it's their problem if their templates still 
> do obj/aq_*. This can be alleviated with a mix-in that Five has, which 
> makes classes regain the aq_* attributes. Not sure if we want to make 
> this public in any way, currently it's basically used for BrowserView 
> and ViewletBase.

I realized after I sent it that BBB was "automatic" for the content
objects, making only views a possible issue:  I'm glad to learn that the
views have the attributes available.   I would recommend a "perpetual
deprecation" for the view BBB (log the warning with a note of the
recommended change, but don't indicate a removal release).

In any case, given the clarification, +1 to the merge.


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

iD8DBQFICKz6+gerLs4ltQ4RAqI9AJ9wWjhsca8iljbeb8z77eHMHgBv/gCdHfa4
SkkZqvDRAxPLPicSQM8ZCPQ=
=o+xz
-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: Proposal: Merge philikon-aq branch into Zope trunk

2008-04-18 Thread Martijn Faassen

Tres Seaver wrote:
[snip]
The second problem that might arise, is that the implicit assumption 
that every object inside Zope 2 inherits from Acquisition base classes 
no longer holds. Code that relies on the various aq_* attributes to be 
there need to be adjusted to use the Acquisition methods instead.


The major downside here is that restricted code doesn't have access to
the required functions ('aq_inner', 'aq_parent', 'aq_acquire'), and
hence use the attributes.  ('aq_base' should not be allowewd at all, as
it strips away security context).

There are probably thousands (or even tens of thousands) of templates
and scripts "in the wild" which use these attributes.  I don't think we
can break them in a single release:  we need to deprecate them first
(with suitalbe logging output), and maybe even provide
'__parent__'-aware workarounds / fallbacks in their implementations.


I'm trying to understand what is proposed that would break them. All 
existing content objects will continue to use acquisition. Only things 
like Five views will stop using acquisition and switch to a __parent__ 
pointer. I doubt there are that many scripts that rely on getting a 
.aq_parent, say, on a Five view. There will be view code that relies on 
this, so I imagine we expect that should be rewritten to use the 
functions instead, but not scripts.


If we were to change OFS so that it'd start using __parent__ then I can 
see where you're coming from, but I don't think anyone's proposing that?


Regards,

Martijn

___
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: Proposal: Merge philikon-aq branch into Zope trunk

2008-04-18 Thread Philipp von Weitershausen

Tres Seaver wrote:
The second problem that might arise, is that the implicit assumption 
that every object inside Zope 2 inherits from Acquisition base classes 
no longer holds. Code that relies on the various aq_* attributes to be 
there need to be adjusted to use the Acquisition methods instead.


The major downside here is that restricted code doesn't have access to
the required functions ('aq_inner', 'aq_parent', 'aq_acquire'), and
hence use the attributes.  ('aq_base' should not be allowewd at all, as
it strips away security context).

There are probably thousands (or even tens of thousands) of templates
and scripts "in the wild" which use these attributes.  I don't think we
can break them in a single release:  we need to deprecate them first
(with suitalbe logging output), and maybe even provide
'__parent__'-aware workarounds / fallbacks in their implementations.


Here's the deal:

* Instances of (subclasses of) Acquisition.Implicit and .Explicit still 
have those aq_* attributes. So basically all content objects still have 
them, no change there.


* Five's BrowserView class doesn't inherit from Acquisition.Explicit 
anymore, but we've provided the aq_* attributes for backward 
compatibility. So if a template does view/aq_parent, it will still work 
(we have tests for this). We haven't set an expiry date for this BBB, 
nor are we logging a warning. We probably should, though, if we 
eventually want to phase out Five's BrowserView class.



So, off the line there's no backward-compatibility problem. Now if 
people decide to implement their content objects without Acquisition 
(which they now can), then it's their problem if their templates still 
do obj/aq_*. This can be alleviated with a mix-in that Five has, which 
makes classes regain the aq_* attributes. Not sure if we want to make 
this public in any way, currently it's basically used for BrowserView 
and ViewletBase.

___
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: Proposal: Merge philikon-aq branch into Zope trunk

2008-04-17 Thread Martin Aspeli

Hanno Schlichting wrote:

Philipp von Weitershausen wrote:

Hanno Schlichting wrote:
Merging it into Zope trunk will get it into the Zope 2.12 release 
which is at this point not scheduled yet, but is unlikely to get a 
release before early 2009. This should give us plenty of time to test.
This sounds good. Here's another idea, though: In accordance with 
"release early and often", how about scheduling the 2.12 release shortly 
after the 2.11 one? So the only "new" thing in 2.12 would be the 
philikon-aq branch (it would still ship with the same Zope 3 libraries 
as 2.11, etc.).


I suspect we want to do something about the eggification story of Zope 2 
for Zope 2.12 as well. Figuring out the approach and documenting it 
might take some additional time. I don't see that releasing another Zope 
2.13 shortly after 2.12 makes a lot of sense.


Why don't we get started on that, too, then?

I think eggification of Zope 2 is relatively easy, and most of the 
necessary R&D has already been done. In fact, a lot of the eggs exist 
already.


I wonder if Philipp would be amenable to writing a proposal on this, and 
get Chris McDonough's input.


Martin

--
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book

___
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: Proposal: Merge philikon-aq branch into Zope trunk

2008-04-17 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hanno Schlichting wrote:
> Hi.
> 
> I'd like to propose to merge the philikon-aq branch into Zope trunk aka 
> Zope 2.12.
> 
> Scope:
> 
> For those unfamiliar with the branch, it makes Acquisition aware of 
> __parent__ pointers. This makes it unnecessary to use Acquisition 
> mixin's for Zope 3 code to use them in Zope 2 code. The security 
> machinery of Zope 2 will still be able to work as expected.
> 
> Status:
> 
> All tests in the Zope itself pass. New tests have been written for all 
> edge cases found during the development of the branch.
> 
> As a real world exposure Plone has been used to test the branch. All 
> tests in Plone except one edge-case of a monkey-patch loaded package 
> still pass. Plone in current versions make heavy use of Zope 3 and Five 
> technologies inside Zope 2, so I see this as a very good indicator for 
> the readiness of the branch. The one edge-case is something which needs 
> to be fixed in Plone, as it doesn't make use of any official API.
> 
> Risks:
> 
> Using Zope 3 code inside Zope 2 has lead to various 'inventive 
> solutions' to work around problems. Some of these have not used official 
> API's. It is possible that some of those might need to be adjusted. 
> Adjusting them should be straight forward in most cases and mostly 
> consist of removing the hackish workarounds.
> 
> The second problem that might arise, is that the implicit assumption 
> that every object inside Zope 2 inherits from Acquisition base classes 
> no longer holds. Code that relies on the various aq_* attributes to be 
> there need to be adjusted to use the Acquisition methods instead.

The major downside here is that restricted code doesn't have access to
the required functions ('aq_inner', 'aq_parent', 'aq_acquire'), and
hence use the attributes.  ('aq_base' should not be allowewd at all, as
it strips away security context).

There are probably thousands (or even tens of thousands) of templates
and scripts "in the wild" which use these attributes.  I don't think we
can break them in a single release:  we need to deprecate them first
(with suitalbe logging output), and maybe even provide
'__parent__'-aware workarounds / fallbacks in their implementations.

> This 
> change is trivial to do and doesn't need to be done at first. It only 
> needs to be done when you want to allow direct Zope 3 code in your 
> application. As part of the branch all code in Zope 2 itself have been 
> adjusted to use the aq_* methods.

Good!

> Timeline:
> 
> I would like to do the merge as soon as possible, so people can easily 
> test it against all their applications and report back problems.
> 
> Merging it into Zope trunk will get it into the Zope 2.12 release which 
> is at this point not scheduled yet, but is unlikely to get a release 
> before early 2009. This should give us plenty of time to test.
> 
> Opinions, votes?
> 
> Hanno
> 
> P.S. Thanks to philiKON for doing most of the work on this branch :)

Many kudos to both of you.



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

iD8DBQFIB4NT+gerLs4ltQ4RAvFlAKDLXkUC/ffrP4pGfNFC94Q815GcQgCfXqFU
WqXqkO8p6JAZiOT4zpgg4wQ=
=iWAn
-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: Proposal: Merge philikon-aq branch into Zope trunk

2008-04-17 Thread Hanno Schlichting

Philipp von Weitershausen wrote:

Hanno Schlichting wrote:
Merging it into Zope trunk will get it into the Zope 2.12 release 
which is at this point not scheduled yet, but is unlikely to get a 
release before early 2009. This should give us plenty of time to test.


This sounds good. Here's another idea, though: In accordance with 
"release early and often", how about scheduling the 2.12 release shortly 
after the 2.11 one? So the only "new" thing in 2.12 would be the 
philikon-aq branch (it would still ship with the same Zope 3 libraries 
as 2.11, etc.).


I suspect we want to do something about the eggification story of Zope 2 
for Zope 2.12 as well. Figuring out the approach and documenting it 
might take some additional time. I don't see that releasing another Zope 
2.13 shortly after 2.12 makes a lot of sense.


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: Proposal: Merge philikon-aq branch into Zope trunk

2008-04-17 Thread Wichert Akkerman
Previously Philipp von Weitershausen wrote:
> This sounds good. Here's another idea, though: In accordance with 
> "release early and often", how about scheduling the 2.12 release shortly 
> after the 2.11 one? So the only "new" thing in 2.12 would be the 
> philikon-aq branch (it would still ship with the same Zope 3 libraries 
> as 2.11, etc.).

+1

Wichert.

-- 
Wichert Akkerman <[EMAIL PROTECTED]>It is simple to make things.
http://www.wiggy.net/   It is hard to make things simple.
___
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: Proposal: Merge philikon-aq branch into Zope trunk

2008-04-17 Thread Martijn Faassen

Hey,

Hanno, this is a major step forward! +1 from me as well.

Regards,

Martijn

___
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: Proposal: Merge philikon-aq branch into Zope trunk

2008-04-17 Thread Philipp von Weitershausen

Hanno Schlichting wrote:

Timeline:

I would like to do the merge as soon as possible, so people can easily 
test it against all their applications and report back problems.


Merging it into Zope trunk will get it into the Zope 2.12 release which 
is at this point not scheduled yet, but is unlikely to get a release 
before early 2009. This should give us plenty of time to test.


This sounds good. Here's another idea, though: In accordance with 
"release early and often", how about scheduling the 2.12 release shortly 
after the 2.11 one? So the only "new" thing in 2.12 would be the 
philikon-aq branch (it would still ship with the same Zope 3 libraries 
as 2.11, etc.).



Opinions, votes?


+1 :)


P.S. Thanks to philiKON for doing most of the work on this branch :)


And thanks to Hanno for testing it against Plone and making lots of 
improvements!

___
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: Proposal: Merge philikon-aq branch into Zope trunk

2008-04-17 Thread Andreas Zeidler

Christian Theune wrote:

On Thu, Apr 17, 2008 at 12:43:25PM +0200, Martijn Pieters wrote:

On Thu, Apr 17, 2008 at 12:27 PM, Hanno Schlichting <[EMAIL PROTECTED]> wrote:

 I would like to do the merge as soon as possible, so people can easily test
it against all their applications and report back problems.

 Merging it into Zope trunk will get it into the Zope 2.12 release which is
at this point not scheduled yet, but is unlikely to get a release before
early 2009. This should give us plenty of time to test.

 Opinions, votes?

+sys.maxint!


Darn. My +1 won't fit in there anymore!


perhaps martijn's still on 32-bit? :)

anyway, +1 from me as well.


andi

--
zeidler it consulting - http://zitc.de/ - [EMAIL PROTECTED]
friedelstraße 31 - 12047 berlin - telefon +49 30 25563779
pgp key at http://zitc.de/pgp - http://wwwkeys.de.pgp.net/
plone 3.1rc1 released! -- http://plone.org/products/plone/
___
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 )