[Zope-dev] Re: Heads up: about to merge new-style ExtensionClass and ZODB 3.3 into Zope 2 head

2003-12-08 Thread Yuppie
Dieter Maurer wrote:
I worked a bit with ZopeHead.

Required CMF patches attached.
Thanks! Based on your patches I made a checkin to CMF HEAD.

Cheers, Yuppie



___
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: Zope 2.7.0 b3 regressions

2003-12-08 Thread Stefan H. Holek
Evan,

absolute_url(1) was broken (by my definition of broken) basically since  
the introduction of VHM, which means the better part of 2 years.  
Naturally, there is code now that relies on this (broken) behavior.  
This does however not mean it should not be fixed!

The ugly part is that the behavior of absolute_url(1) changes suddenly  
when the Vhost configuration starts to include inside-out parts  
(_vh_xyz). This means that is is possible to break (seemingly) working  
code by reconfiguring Apache. :-(

I had some very bad experiences with big packages like CPS2 that  
suddenly exploded in my face at the worst possible time (deployment at  
the customer's site).

The idiom '/'+absolute_url(1) to get the path part of an object's URL  
is *very* common, and as luck will have it *works absolutely fine* as  
long as inside-out hosting is not present. So this error usually goes  
undetected and creeps all over people's code. I'd be willing to bet  
that it is possible to break other packages like, say, Plone simply by  
changing Vhost configs as well ;-).

Note that this is one of my main points: It will be of little use to  
document usage of BASEPATH1+absolute_url(1) when '/'+absolute_url(1)  
appears to work (until it is far too late).

Once you have a big package poisoned like this, all you can basically  
do is monkey-patch absolute_url() which is what I had to do on several  
occasions.

So by my definition, the URL (relative or not) should *always* include  
eventual _vh_xyz parts. If what one really needs is related to the  
physical layout of the ZODB, there is always getPhysicalPath().

URLs are in fact just some whack attributes of objects, and objects can  
have more than one URL at any time, depending on Vhost configs *only*.  
URLs are a function of the current REQUEST (traversal) and do represent  
little information with regard to an object's location in the ZODB.

I see the main issue here in that the concepts of URL and physical  
location are not well separated (CMF's getIcon() attempting to use URLs  
to locate objects for example).

Should this be your last word on this I am with Lennart in that we have  
to think about a whole new class of API methods for URL information.

Regards,
Stefan
P.S.: I have written a bunch of regression tests for absolute_url  
behavior over the weekend and if nobody tells me otherwise am going to  
check them into Products/SiteAccess/tests.



On Montag, Dez 8, 2003, at 07:53 Europe/Vienna, Evan Simpson wrote:

Yuppie wrote:
Yes. getIcon() is the cause of the problem I see:
To access the ZMI I use this Apache rule:
ProxyPass /zope27  
http://localhost:8080/VirtualHostBase/http/example.org:80/ 
VirtualHostRoot/_vh_zope27 getIcon() for a folder in myCMFSite  
returns 'zope27/myCMFSite/folder_icon.gif'
(was 'myCMFSite/folder_icon.gif' in Zope 2.6)
OFS/dtml/main.dtml adds BASEPATH1, so the URL is  
'/zope27/zope27/myCMFSite/folder_icon.gif'
(would be '/zope27/myCMFSite/folder_icon.gif' in Zope 2.6)
Based on this, and on a lot of back-burner pondering, I'm now thinking  
that the proper fix for this is the one you suggest.  It makes sense  
for the relative version of the absolute path to omit BASE1, the URL  
of the virtual root, returning the semantics of absolute_path(1) to  
path relative to the virtual root.  Use cases that need a  
hostname-relative URL can use BASEPATH1 + absolute_url(1).

Cheers,

Evan @ 4-am
--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/
___
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: Zope 2.7.0 b3 regressions

2003-12-08 Thread Leonardo Rochael Almeida
On Mon, 2003-12-08 at 09:35, Stefan H. Holek wrote:
 [...]
 So by my definition, the URL (relative or not) should *always* include  
 eventual _vh_xyz parts. If what one really needs is related to the  
 physical layout of the ZODB, there is always getPhysicalPath().

+1

 URLs are in fact just some whack attributes of objects, and objects can  
 have more than one URL at any time, depending on Vhost configs *only*.  
 URLs are a function of the current REQUEST (traversal) and do represent  
 little information with regard to an object's location in the ZODB.

+1

 I see the main issue here in that the concepts of URL and physical  
 location are not well separated (CMF's getIcon() attempting to use URLs  
 to locate objects for example).

IMHO, this is broken behaviour. If you try to use an URL to locate an
object, the only sane behaviour is to feed this URL to an URL api
(probably in the REQUEST object) to get it mapped to a physical path.

 Should this be your last word on this I am with Lennart in that we have  
 to think about a whole new class of API methods for URL information.

I think this should be done anyway, because of backward compatibility
problems. Really, I think it's ok if at some point we simply say hey,
now we'll use this new API because that old API was broken and people
relied on the broken behaviour. This is certainly better than pulling
people's rug under their feet. We could then start deprecating the old
API and eventually pull it away, if the arrival of Zope3 doesn't obviate
it anyway :-)


 P.S.: I have written a bunch of regression tests for absolute_url  
 behavior over the weekend and if nobody tells me otherwise am going to  
 check them into Products/SiteAccess/tests.

+5 Yes, please!

As the author of ASP404, I'd really like to be able to rely on Zope's
virtual hosting behaviour.

-- 
Ideas don't stay in some minds very long because they don't like
solitary confinement.


___
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: Zope 2.7.0 b3 regressions

2003-12-08 Thread Lennart Regebro
Leonardo Rochael Almeida wrote:
IMHO, this is broken behaviour. If you try to use an URL to locate an
object, the only sane behaviour is to feed this URL to an URL api
(probably in the REQUEST object) to get it mapped to a physical path.
(Un)RestrictedTraverse can do this, right? Or does that require the full 
physical Path/URL?

On Mon, 2003-12-08 at 09:35, Stefan H. Holek wrote:
P.S.: I have written a bunch of regression tests for absolute_url  
behavior over the weekend and if nobody tells me otherwise am going to  
check them into Products/SiteAccess/tests.
I think this is a good idea. In any case I'd like them, to adapt them to 
the getXXPath API's, which I think I'll check in tomorrow. They are 
really trivial methods, but it would be good to have unit tests for API 
documentation. :)

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


[Zope-dev] Newbie Question

2003-12-08 Thread Aaron Paxson
I hope I'm posting to the right mailing list.  There were so many to decide
from.

I've just been introduced to Zope, and am curious on how it will fit into my
company's plans.

I'm currently learning Java, and was starting to learn the RedHat Web
Application Framework.  I've found Zope in an article on the web, and
started to look into it.  It looks to be just as scalable, but I'm curious
on how extensible it is, as well as, it's power in a corporate environment.

For example, how extensible is it, to modify the security module and have it
authenticate against LDAP?  (I don't want all my users to remember yet
another password) Also, how powerful is Python as compared to Java?  Since
it uses a native compiler, it stands to reason that it would be faster than
Java, but what of it's objects and packages?  (i.e. Does it have an image
manipulation package, or networking packages?)

I must say, seeing the documentation and books alone, tells me the product
is good, and something I can learn.  I see alot of Hope for Zope grin,
couldn't resist, but I don't want to get into it, just to see if it doesn't
fit into my plans.

For those who want a couple of examples, I have 3 projects for our
intranet/extranet/internet applications:

1).  Images and cataloging (where, our development team can upload their
images, and the intranet application will take that image and export it to a
JPG to update the web catalog, and move the original file to our FTP site
for our photographers.

2).  Document Management (Uploading of files, and inputting data to index on
those files for searching)

3).  Obviously the usual (Content Management and Portals) which I'm sure
Zope does a good job at.

Thanks in advance!!  Again, my apologies if there is a better list for this
post.

Aaron Paxson
Network Operations Manager
Decorative Concepts, Inc
http://www.decorativeconcepts.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] Newbie Question

2003-12-08 Thread Peter Sabaini
Aaron Paxson wrote:
I hope I'm posting to the right mailing list.  There were so many to decide
from.
This should've probably been directed to the main Zope list; zope-dev is 
for development *of* Zope.

I've just been introduced to Zope, and am curious on how it will fit into my
company's plans.
I'm currently learning Java, and was starting to learn the RedHat Web
Application Framework.  I've found Zope in an article on the web, and
started to look into it.  It looks to be just as scalable, but I'm curious
on how extensible it is, as well as, it's power in a corporate environment.
For example, how extensible is it, to modify the security module and have it
authenticate against LDAP?  (I don't want all my users to remember yet
another password) Also, how powerful is Python as compared to Java?  Since
it uses a native compiler, it stands to reason that it would be faster than
Java, but what of it's objects and packages?  (i.e. Does it have an image
manipulation package, or networking packages?)
There are Add-ons that do User authentification against LDAP servers, 
and its also not very hard to roll your own.

Zope is, generally speaking, *very* extensible -- see for example the 
long list of 3rd pary add-on products at http://www.zope.org/Products

I think Python is one of the greatest strengths of Zope. Its not only a 
modern full-fledged OOP language, comes with great libraries (see 
http://python.org/doc/current/modindex.html, and has even more to 
download separately) but is simply a joy to program in. Bruce Eckel put 
it very nicely IMHO: http://mindview.net/FAQ/FAQ-012 )

Also see:

http://csdl.computer.org/comp/mags/co/2000/10/rx023abs.htm
http://www.cis.udel.edu/~silber/470STUFF/article.pdf
http://www.twistedmatrix.com/users/glyph/rant/python-vs-java.html

There are good networking modules in the standard Python distribution; 
image manipulation can be done with eg. PIL 
(http://www.pythonware.com/products/pil/) or PythonMagick 
(http://www.procoders.net/moinmoin/PythonMagick)

I must say, seeing the documentation and books alone, tells me the product
is good, and something I can learn.  I see alot of Hope for Zope grin,
couldn't resist, but I don't want to get into it, just to see if it doesn't
fit into my plans.
For those who want a couple of examples, I have 3 projects for our
intranet/extranet/internet applications:
1).  Images and cataloging (where, our development team can upload their
images, and the intranet application will take that image and export it to a
JPG to update the web catalog, and move the original file to our FTP site
for our photographers.
2).  Document Management (Uploading of files, and inputting data to index on
those files for searching)
3).  Obviously the usual (Content Management and Portals) which I'm sure
Zope does a good job at.
Those are certainly suited for Zope

 - peter.

Thanks in advance!!  Again, my apologies if there is a better list for this
post.
Aaron Paxson
Network Operations Manager
Decorative Concepts, Inc
http://www.decorativeconcepts.com


smime.p7s
Description: S/MIME Cryptographic Signature
___
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: Zope 2.7.0 b3 regressions

2003-12-08 Thread Paul Winkler
On Mon, Dec 08, 2003 at 12:35:38PM +0100, Stefan H. Holek wrote:
 Note that this is one of my main points: It will be of little use to  
 document usage of BASEPATH1+absolute_url(1) when '/'+absolute_url(1)  
 appears to work (until it is far too late).

As a frequent (ab)user of '/'+absolute_url(1), which did indeed
bite me when i deployed to an inside out apache setup,
I thought I'd try this out... I think you 
meant BASEPATH1+'/'+absolute_url(1)?

I put this in a page template called test_abs_url:

  pTypical relative path using absolute_url(1): 
  span tal:replace=python:'/' + here.absolute_url(1) / 
  /p
  pBASEPATH1 is: span tal:replace=request/BASEPATH1 / /p
  pBetter relative path using BASEPATH1 and absolute_url(1): 
  span tal:replace=python:request['BASEPATH1']+here.absolute_url(1) / 
  /p


If I visit this at http://localhost:8080/ctimi/about/test_abs_url, I get:


 Typical relative path using absolute_url(1): /ctimi/about

 BASEPATH1 is:

 Better relative path using BASEPATH1 and absolute_url(1): ctimi/about 

  ^^
note, no leading slash

If I visit 
http://localhost:18080/VirtualHostBase/http/www.foobar.com:80/VirtualHostRoot/_vh_foo/ctimi/about/abs_url_test
I get this:


 Typical relative path using absolute_url(1): /ctimi/about

 BASEPATH1 is: /foo

 Better relative path using BASEPATH1 and absolute_url(1): /fooctimi/about 


... definitely not right.
But your point is made - '/'+absolute_url(1) is clearly inadequate too.

If I change the template to use request['BASEPATH1']+'/'+here.absolute_url(1),
then I get this:


 Typical relative path using absolute_url(1): /ctimi/about

 BASEPATH1 is: /foo

 Better relative path using BASEPATH1 and absolute_url(1): /foo/ctimi/about 


... which looks correct to me.

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's CHEESY ENGINEER!
(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] Zope.org - SteveVisitingFredericksburgSprint

2003-12-08 Thread Martijn Faassen
Jim Fulton wrote:
 
 Steve Alexander and I will be hosting a sprint in Fredericksburg
 January 12-14, 2004:
 
   http://dev.zope.org/Zope3/SteveVisitingFredericksburgSprint
 
 A possible topic is Zope 2 to Zope 3  transition and working on
 Zope 2.9.

Before independent discussions erupt here, see my response on zope3-dev
with my worries about Zope 2.9 and what I think the right thing to do is
concerning Zope 3 technology in Zope 2: making as much as possible work with
Zope 2.7 *without changing Zope 2*.

Zope 2.9 will still happen of course, and will be able to do more than 
what's possible against a base of Zope 2.7, but it's a while off (a year
by an optimistic estimate) and work on Zope 2.7 integration can start today 
instead.

Here's my posting:

http://mail.zope.org/pipermail/zope3-dev/2003-December/009023.html

and a minor correction:

http://mail.zope.org/pipermail/zope3-dev/2003-December/009025.html

Regards,

Martijn


___
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: Zope 2.7.0 b3 regressions

2003-12-08 Thread Toby Dickenson
On Monday 08 December 2003 11:35, Stefan H. Holek wrote:

 Note that this is one of my main points: It will be of little use to
 document usage of BASEPATH1+absolute_url(1) when '/'+absolute_url(1)
 appears to work (until it is far too late).

We can fix this social problem by providing an easy way for product developers 
to run their development zope server with the virtual path equivalent to an 
inside-out hosting configuration. easy means not needing apache/squid.

Our staging server is uses an inside-out virtual host configuration (to 
simplify ssl certificate management) so we hit all these problems early 
enough to fix the damage cheaply.


-- 
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] Newbie Question

2003-12-08 Thread Aaron Paxson
Thanks for resonding, even though there was a better list!  I've got some
fantastic replies, and was overwhelmed with the answers!

I'll definately give Zope a try.


-Original Message-
From: Peter Sabaini [mailto:[EMAIL PROTECTED]
Sent: Monday, December 08, 2003 10:32 AM
To: Aaron Paxson
Cc: '[EMAIL PROTECTED]'
Subject: Re: [Zope-dev] Newbie Question


Aaron Paxson wrote:
 I hope I'm posting to the right mailing list.  There were so many to
decide
 from.

This should've probably been directed to the main Zope list; zope-dev is 
for development *of* Zope.

 I've just been introduced to Zope, and am curious on how it will fit into
my
 company's plans.
 
 I'm currently learning Java, and was starting to learn the RedHat Web
 Application Framework.  I've found Zope in an article on the web, and
 started to look into it.  It looks to be just as scalable, but I'm curious
 on how extensible it is, as well as, it's power in a corporate
environment.
 
 For example, how extensible is it, to modify the security module and have
it
 authenticate against LDAP?  (I don't want all my users to remember yet
 another password) Also, how powerful is Python as compared to Java?  Since
 it uses a native compiler, it stands to reason that it would be faster
than
 Java, but what of it's objects and packages?  (i.e. Does it have an image
 manipulation package, or networking packages?)

There are Add-ons that do User authentification against LDAP servers, 
and its also not very hard to roll your own.

Zope is, generally speaking, *very* extensible -- see for example the 
long list of 3rd pary add-on products at http://www.zope.org/Products

I think Python is one of the greatest strengths of Zope. Its not only a 
modern full-fledged OOP language, comes with great libraries (see 
http://python.org/doc/current/modindex.html, and has even more to 
download separately) but is simply a joy to program in. Bruce Eckel put 
it very nicely IMHO: http://mindview.net/FAQ/FAQ-012 )

Also see:

http://csdl.computer.org/comp/mags/co/2000/10/rx023abs.htm
http://www.cis.udel.edu/~silber/470STUFF/article.pdf

http://www.twistedmatrix.com/users/glyph/rant/python-vs-java.html

There are good networking modules in the standard Python distribution; 
image manipulation can be done with eg. PIL 
(http://www.pythonware.com/products/pil/) or PythonMagick 
(http://www.procoders.net/moinmoin/PythonMagick)

 I must say, seeing the documentation and books alone, tells me the product
 is good, and something I can learn.  I see alot of Hope for Zope grin,
 couldn't resist, but I don't want to get into it, just to see if it
doesn't
 fit into my plans.
 
 For those who want a couple of examples, I have 3 projects for our
 intranet/extranet/internet applications:
 
 1).  Images and cataloging (where, our development team can upload their
 images, and the intranet application will take that image and export it to
a
 JPG to update the web catalog, and move the original file to our FTP site
 for our photographers.
 
 2).  Document Management (Uploading of files, and inputting data to index
on
 those files for searching)
 
 3).  Obviously the usual (Content Management and Portals) which I'm sure
 Zope does a good job at.

Those are certainly suited for Zope

  - peter.

 Thanks in advance!!  Again, my apologies if there is a better list for
this
 post.
 
 Aaron Paxson
 Network Operations Manager
 Decorative Concepts, Inc
 http://www.decorativeconcepts.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: Zope 2.7.0 b3 regressions

2003-12-08 Thread Lennart Regebro
Paul Winkler wrote:
As a frequent (ab)user of '/'+absolute_url(1), which did indeed
bite me when i deployed to an inside out apache setup,
I thought I'd try this out... I think you 
meant BASEPATH1+'/'+absolute_url(1)?
I would like to know:
1. Exactly what is an inside out apache setup.
2. What is the result you want?


___
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: Zope 2.7.0 b3 regressions

2003-12-08 Thread Paul Winkler
On Mon, Dec 08, 2003 at 05:58:12PM +0100, Lennart Regebro wrote:
 Paul Winkler wrote:
 As a frequent (ab)user of '/'+absolute_url(1), which did indeed
 bite me when i deployed to an inside out apache setup,
 I thought I'd try this out... I think you 
 meant BASEPATH1+'/'+absolute_url(1)?
 
 I would like to know:
 1. Exactly what is an inside out apache setup.

See the About tab on VHM. Inside out is mentioned
numerous times in this thread.

 2. What is the result you want?

The result that I got by doing BASEPATH1+'/'+absolute_url(1)
as described in my previous message. I thought that was clear.

BASEPATH1 does not have a trailing slash, and
absolute_url(1) does not have a leading slash, so if you
visit _vh_foo/bar you will get foobar instead of foo/bar.
Therefore, BASEPATH1 + absolute_url(1) does not work.
You have to insert the slash.

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's LATE HYDROXY WATERBOY!
(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: Zope 2.7.0 b3 regressions

2003-12-08 Thread Lennart Regebro
Paul Winkler wrote:
See the About tab on VHM.
OK, good.


Inside out is mentioned
numerous times in this thread.
Yeah, I know, but I was getting confused to what it actually ment.

The result that I got by doing BASEPATH1+'/'+absolute_url(1)
as described in my previous message. I thought that was clear.
Now it is. :) Thanks.

//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] Zope 2.7.0 b3 regressions

2003-12-08 Thread Stefan H. Holek
After reading this paragraph for the third time I realized you have a 
very good point here.

But

quote by=Evan Simpson
Relative in this context refers to the concept of a relative path 
as used in rfc1808, not to a relationship with a Zope object.  It is 
meant for use in situations such as redirection to a secure page from 
an insecure one (eg. 'https://example.com' + target.absolute_url(1)) 
where you would otherwise have to generate the complete URL and then 
break it apart.
/quote

So, what do we want relative to mean for absolute_url?

Stefan

On Mittwoch, Dez 3, 2003, at 20:14 Europe/Vienna, Dieter Maurer wrote:

  When you accept that absolute_url(1) should come near
  to the notion of server relative absolute URL, then
  it *must* return an URL with respect to the currently
  active site root. Otherwise, the browser using this URL
  will interpret it wrongly. It may still work due to acquisition,
  but this is more by accident.
--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/
___
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] WebDAV Collection/Resource Chameleon Question

2003-12-08 Thread Eric Roby
We are trying to  make a 'folderish' (WebDAV Collection) class appear as
a WebDAV Resource to WebDAV clients.  I won't go into the reasons why we
want to do this unless someone is interested. We have made several
attempts at this but have been unsuccessful to date.  Rather than go
into all the gory details about what we have tried I am asking if anyone
could tell me if it is even technically possible to trick the WebDAV
machinery (server/client) into treating this class in this way?

TIA

Eric


___
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] Zope Head (2.8) breaks refresh

2003-12-08 Thread Dieter Maurer
Jeremy Hylton wrote at 2003-12-7 23:01 -0500:
On Sun, 2003-12-07 at 08:15, Dieter Maurer wrote:
   ATT: replacing the cache without clearing it can lead to huge
   memory leaks (everything in the old cache is leaked!).

Without commenting on the rest of the bug report, I should mention that
caches and persistent objects all participate in cyclic GC.  They will
not leak the way pre-2.8 caches did.

Has the do not free when a cycle contains an object with destructor
restriction been removed from the cyclic GC?

It is not unlikely that the cache references an object with a __del__.
This may keep the cache and all its content.

-- 
Dieter

___
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: Zope 2.7.0 b3 regressions

2003-12-08 Thread Dieter Maurer
Stefan H. Holek wrote at 2003-12-8 12:35 +0100:
 ...
The ugly part is that the behavior of absolute_url(1) changes suddenly  
when the Vhost configuration starts to include inside-out parts  
(_vh_xyz). This means that is is possible to break (seemingly) working  
code by reconfiguring Apache. :-(

Maybe, my contribution has not been read. Thus, I try again:

   / + absolute_url(1) should implement the notion
   of absolute-path URL reference (see RFC2396 section 5).

   This means, that the receiving browser should be able
   to retrieve the object correctly given this URL reference.

-- 
Dieter

___
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] Zope Head (2.8) breaks refresh

2003-12-08 Thread Jeremy Hylton
On Mon, 2003-12-08 at 13:17, Dieter Maurer wrote:
 Jeremy Hylton wrote at 2003-12-7 23:01 -0500:
 On Sun, 2003-12-07 at 08:15, Dieter Maurer wrote:
ATT: replacing the cache without clearing it can lead to huge
memory leaks (everything in the old cache is leaked!).
 
 Without commenting on the rest of the bug report, I should mention that
 caches and persistent objects all participate in cyclic GC.  They will
 not leak the way pre-2.8 caches did.
 
 Has the do not free when a cycle contains an object with destructor
 restriction been removed from the cyclic GC?
 
 It is not unlikely that the cache references an object with a __del__.
 This may keep the cache and all its content.

I don't think it makes a lot of sense to put an __del__ method on a
Persistent object.  When would you expect it to be called?  Every time
the object is turned into a ghost?  When the object is removed by pack? 
I can imagine some people would try to migrate non-persistent code to
ZODB and have to deal with __del__ then.  If I were doing that, I'd make
sure to check gc.garbage when I tested and fix any code that caused
leaks.

Jeremy



___
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] Zope 2.7.0 b3 regressions

2003-12-08 Thread Dieter Maurer
Stefan H. Holek wrote at 2003-12-8 19:14 +0100:
 ...
So, what do we want relative to mean for absolute_url?

I spelled it out more precisely in a recent post (after
rereading RFC2693). In my view '/' + obj.absolute_url(1)
should implement the absolute path relative URL for obj
(as defined by RFC2693, section 5).

-- 
Dieter

___
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 Head (2.8) breaks refresh

2003-12-08 Thread Dieter Maurer
Dieter Maurer wrote at 2003-12-7 14:15 +0100:
Playing with Zope Head (as of 2003-12-04) revealed problems with
refresh.

Turns out to be a bug in ZODB.Connection.Connection._setDB:

  ConnectionObjectReader used the old cache while
  refresh cause a new cache to be installed later
  in _resetCache.

Patch attached.

-- 
Dieter
--- ZODB/Connection.py~	2003-11-28 17:44:49.0 +0100
+++ ZODB/Connection.py	2003-12-08 21:26:49.0 +0100
@@ -158,8 +158,6 @@
 Any objects modified since the last transaction are invalidated.
 
 self._db = odb
-self._reader = ConnectionObjectReader(self, self._cache,
-  self._db._classFactory)
 self._storage = odb._storage
 self._sortKey = odb._storage.sortKey
 self.new_oid = odb._storage.new_oid
@@ -168,6 +166,8 @@
 self._resetCache()
 else:
 self._flush_invalidations()
+self._reader = ConnectionObjectReader(self, self._cache,
+  self._db._classFactory)
 self._opened = time()
 
 return self
___
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 Head (2.8) breaks refresh

2003-12-08 Thread Jeremy Hylton
On Mon, 2003-12-08 at 15:36, Dieter Maurer wrote:
 Dieter Maurer wrote at 2003-12-7 14:15 +0100:
 Playing with Zope Head (as of 2003-12-04) revealed problems with
 refresh.
 
 Turns out to be a bug in ZODB.Connection.Connection._setDB:
 
   ConnectionObjectReader used the old cache while
   refresh cause a new cache to be installed later
   in _resetCache.
 
 Patch attached.

The patch doesn't make sense:

--- ZODB/Connection.py~ 2003-11-28 17:44:49.0 +0100
+++ ZODB/Connection.py  2003-12-08 21:26:49.0 +0100
@@ -158,8 +158,6 @@
-self._reader = ConnectionObjectReader(self, self._cache,
-  self._db._classFactory)
@@ -168,6 +166,8 @@
+self._reader = ConnectionObjectReader(self, self._cache,
+  self._db._classFactory)

Is there any difference between these two execept for whitespace?

Jeremy



___
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 Head (2.8) breaks refresh

2003-12-08 Thread Yuppie
Jeremy Hylton wrote:
@@ -158,8 +158,6 @@
-self._reader = ConnectionObjectReader(self, self._cache,
-  self._db._classFactory)
@@ -168,6 +166,8 @@
+self._reader = ConnectionObjectReader(self, self._cache,
+  self._db._classFactory)
Is there any difference between these two execept for whitespace?
Line numbers?

HTH, Yuppie



___
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] Zope 2.7.0 b3 regressions

2003-12-08 Thread Paul Winkler
On Mon, Dec 08, 2003 at 07:14:28PM +0100, Stefan H. Holek wrote:
 After reading this paragraph for the third time I realized you have a 
 very good point here.
 
 But
 
 quote by=Evan Simpson
 Relative in this context refers to the concept of a relative path 
 as used in rfc1808, not to a relationship with a Zope object.  It is 
 meant for use in situations such as redirection to a secure page from 
 an insecure one (eg. 'https://example.com' + target.absolute_url(1)) 
 where you would otherwise have to generate the complete URL and then 
 break it apart.
 /quote
 
 So, what do we want relative to mean for absolute_url?

Speaking for myself, what I really want is something that always 
works for the client, since that's who generally cares about URLs.
I like the behavior of Evan's fix. For looking up objects in zope,
we should use other methods such as getPhysicalPath().
Lennart's path2url() would be handy.

But I don't think it's worth the backward compatibility pain
to change absolute_url(1) now.
We've been waiting ages for a stable Zope 2.7, IMHO it's too late 
for something this problematic to change.

So my proposal is this:

1) Implement distinct methods for client-useable virtual paths
vs. server-useable containment paths, as Lennart proposes.

2) absolute_url(1) in Zope 2.7 should continue to work as 
in = 2.6. 

3) As soon as we decide conclusively what is going to happen
with absolute_url(1) in zope 2.8, we can have it log a deprecation 
warning.  (Hmm, that could really annoy admins. A deprecation
warning on every call to getIcon(), ugh. Other ideas?)

4) In zope 2.8, we have the new behavior, whatever we decide that is.

We also have to be sure to update the Help docs
and the long-suffering API Reference.

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's LIUTENANT ON WHEELS!
(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] 2.7 on Windows

2003-12-08 Thread J. Cameron Cooper
Lennart Regebro wrote:

I'm having serious trouble in getting HEAD running in Windows. Obviously,
configure doesn't work. :-)
I found something on zope.org telling me to run python  inst\configure.py
and in in turn tells me to run nmake build. This builds Zope, but creates no
z2.py or runzope.py or anything like that. What next? Any ideas?
The 2.7 install process is different. Follow the instructions left by 
the end of the build script, or follow the instructions in the README 
(or is it INSTALL? I forget.)

Hint: mkzopeinstance

 --jcc

--
My point and period will be throughly wrought,
Or well or ill, as this day's battle's fought.


___
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: Zope 2.7.0 b3 regressions

2003-12-08 Thread Paul Winkler
On Mon, Dec 08, 2003 at 08:24:04PM +0100, Dieter Maurer wrote:
 Maybe, my contribution has not been read. Thus, I try again:
 
/ + absolute_url(1) should implement the notion
of absolute-path URL reference (see RFC2396 section 5).
 
This means, that the receiving browser should be able
to retrieve the object correctly given this URL reference.

Yup.
But while we're on the subject...
Why doesn't absolute_url(1) include a leading slash?
I don't think I've ever seen a use of absolute_url(1)
that didn't have to add the slash. What was the rationale
originally?

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's ZOOMING SOLITARY PICNINC CHLAMYDIA  OOZE!
(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: Zope Head (2.8) breaks refresh

2003-12-08 Thread Jeremy Hylton
On Mon, 2003-12-08 at 15:56, Yuppie wrote:
 Jeremy Hylton wrote:
  @@ -158,8 +158,6 @@
  -self._reader = ConnectionObjectReader(self, self._cache,
  -  self._db._classFactory)
  @@ -168,6 +166,8 @@
  +self._reader = ConnectionObjectReader(self, self._cache,
  +  self._db._classFactory)
  
  Is there any difference between these two execept for whitespace?
 
 Line numbers?
 
 HTH, Yuppie

Yes.  That helps :-).

Jeremy



___
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] WebDAV Collection/Resource Chameleon Question

2003-12-08 Thread J. Cameron Cooper
Eric Roby wrote:

We are trying to  make a 'folderish' (WebDAV Collection) class appear as
a WebDAV Resource to WebDAV clients.  I won't go into the reasons why we
want to do this unless someone is interested. We have made several
attempts at this but have been unsuccessful to date.  Rather than go
into all the gory details about what we have tried I am asking if anyone
could tell me if it is even technically possible to trick the WebDAV
machinery (server/client) into treating this class in this way?
 

Are you trying to use webdav.Collection by itself? That won't work: it's 
a mix-in class, meant to enable WebDAV support for actual collections of 
objects, like Folders. There's precious little to do to make Zope 
visible to WebDAV clients: just one switch (and maybe one permission) to 
throw. Very much like Zope's FTP support. Perhaps you should read

http://zope.org/Documentation/Books/ZopeBook/2_6Edition/ExternalTools.stx
http://zope.org/Documentation/Articles/WebDAV
--jcc

--
My point and period will be throughly wrought,
Or well or ill, as this day's battle's fought.


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