Re: [Zope-dev] Re: Post-mortem [Was: Zope 2.7.0 b3 regressions]

2003-12-10 Thread Lennart Regebro
From: Evan Simpson [EMAIL PROTECTED]
 Lennart proposed additional methods, but I'm going to work on that in
 the post-2.7 branches, since I really want to clean up this mess
 properly, and beta 3 isn't the time.

I totally agree. This is new features, introducing that in a beta3 seems
very bad. I proposed introducing them in 2.7 only to:

1. Get things moving by scaring people. :-)
2. A way of fixing absolute_url by making it's bugs less important.

If absolute_url can be fixed so it doesn't break backwards compatibility,
then number 2 is of no importance.

//Lennart




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


Re: [Zope-dev] Re: Post-mortem [Was: Zope 2.7.0 b3 regressions]

2003-12-10 Thread Evan Simpson
Brian Lloyd wrote:
Good call. I think it would be best to make sure the docstring of the 
new method is clear on its reason for being. I think somewhere there 
is an interface file that is used to generate some of the api docs - 
ideally that can get updated too.
Done and done!

Cheerios,

Evan

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


Re: [Zope-dev] Re: Post-mortem [Was: Zope 2.7.0 b3 regressions]

2003-12-09 Thread Toby Dickenson
On Tuesday 09 December 2003 16:24, Evan Simpson wrote:
 Summary: absolute_url(1)

Looks good.

-- 
Toby Dickenson


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


Re: [Zope-dev] Re: Post-mortem [Was: Zope 2.7.0 b3 regressions]

2003-12-09 Thread Paul Winkler
On Tue, Dec 09, 2003 at 10:24:47AM -0600, Evan Simpson wrote:
 def absolute_url_path(self):
'''Return the entire path of the absolute URL for this object.
   This includes the leading slash, and can be used as an
   absolute-path reference as defined in RFC 2396.
'''

OK. But maybe the docstrings could be more clear about
BASEPATH1?  IIUC, absolute_url(1) will leave out BASEPATH1, 
continuing the behavior from zope  2.7, but absolute_url_path() will
include BASEPATH1?

I propose this, in OFSP/help/ObjectManagerItem.py:

def absolute_url_path(self):
'''
Return the entire path portion of the absolute URL for this object.

This includes the leading slash and BASEPATH1, and can be used 
as an absolute-path reference as defined in RFC 2396.
Thus, this method is always safe to use with VirtualHostMonster.
'''

def absolute_url(relative=None):

Return the absolute url to the object.

If the relative argument is provided with a true value, then
the URL returned is relative to the site object. Does not include 
a leading slash or BASEPATH1, thus is not always safe to
use with VirtualHostMonster. Code that uses '/'+absolute_url(1)
should be changed to use absolute_url_path instead.

Permission -- Always available


I removed the logical rather than physical note from absolute_url
because I don't think it was actually true before Evan's change,
which IIUC is being reverted. Maybe I misunderstood.

 Lennart proposed additional methods, but I'm going to work on that in 
 the post-2.7 branches, since I really want to clean up this mess 
 properly, and beta 3 isn't the time.

Great.

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's HYPO-SUPERCALIFRAGILISTICEXPIALADOCIOUS THIGH MAN!
(random hero from isometric.spaceninja.com)

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


RE: [Zope-dev] Re: Post-mortem [Was: Zope 2.7.0 b3 regressions]

2003-12-09 Thread Brian Lloyd
 Summary: absolute_url(1) didn't include the path to the virtual root, 
 which broke code that assumed that it could just prepend / in all 
 cases.  I changed it to include the base path, and broke code that 
 prepends BASEPATH1.
 
 Since the old behavior existed for two years (including part of the 2.7 
 beta), is arguably easier to work with, and works with existing CMF 
 code, I will revert to it.  This will leave /-prepending code broken.
 
 In line with Stefan's original suggestion, I will add a new method with 
 alternate behavior.  It's not hard to grep for broken code and use the 
 new method to make it correct -- Product authors should do so.

Good call. I think it would be best to make sure the docstring of the 
new method is clear on its reason for being. I think somewhere there 
is an interface file that is used to generate some of the api docs - 
ideally that can get updated too.


Brian Lloyd[EMAIL PROTECTED]
V.P. Engineering   540.361.1716  
Zope Corporation   http://www.zope.com 



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