Re: [Zope-dev] Re: death to index_html; ObjectManager?

2002-04-17 Thread Toby Dickenson

On Tuesday 16 Apr 2002 10:25 pm, Casey Duncan wrote:

However, you should know that the crux of this change is really to the
publisher, the mixin is just the management piece.

Hmmm. Thanks for raising this. I wasnt aware that these browser_default 
changes went so deep.

Im curious as to *why* they do. It looks like the requirements on the wiki 
could have been implemented by getting the management interface to add a 
smart index_html attribute that delegates to the real method.

 *any* object can
define a browser_default hook that overrides 'index_html', not just
objectmanagers.

Ive just checked through the implementation to see if you really mean *any* 
object. and you do. The name browser_default is in the namespace 
accessible to PropertyManager (for properties) and ObjectManager (for 
sub-objects).  I guess this choice was deliberate, but I can see it being a 
problem for all those objects that are objects not content.

I would be happier if this change to ZPublisher was conditional on something 
outside the through-the-web manageable namespace, and something which means 
it is turned off by default for legacy objects. Either an interface 
assertion, or something like:

*** lib/python/ZPublisher/BaseRequest.py27 Mar 2002 21:51:05 -  
1.47
--- lib/python/ZPublisher/BaseRequest.py17 Apr 2002 08:39:49 -
***
*** 254,256 
  entry_name = path.pop()
! elif hasattr(getattr(object, 'aq_base', object),
   'browser_default'):
--- 254,258 
  entry_name = path.pop()
! elif getattr(getattr(object, 'aq_base', object),
!  '_implements_browser_default', 0) and \
!  hasattr(getattr(object, 'aq_base', object),
   'browser_default'):





___
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: 2.3.3 - 2.5.1b2 upgrade problem

2002-04-17 Thread Simon Michael

R. David Murray [EMAIL PROTECTED] writes:
 Probably, but I naively imagined that I was sophisticated enough
 to be finding a real problem...but I'm obviously not smart enough
 to realize that a breakage this fundamental could be due to a package
 like ZDebug.

I wasn't either.. I think the word is getting around now, but it would be
great to see ZDebug updated to work with newer zope versions. I really
miss it.


___
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] Speaking of 2.6...

2002-04-17 Thread Stefan H. Holek

At 17.04.2002 10:57 -0400, Brian Lloyd wrote:

 From the Zen of Python: Explicit is better than implicit.

We've been trying hard to adopt this bit of Zen. If you write
REQUEST.set, you can look at it and easily see what is happening.
Same with SESSION.set.

If you're looking at dtml-set... as a newbie to Zope, your
first thought is probably where exactly is this being set?.
Who decided that REQUEST was a better place to implicitly set
the variable? Why not the SESSION?

Agreed, in this light the set tag turns into a source of confusion.

How about a dtml-requestset, dtml-sessionset pair then?

;-) ;-)

ducking
Stefan

PS: Only half joking as the dtml-set syntax is sweet, especially 'optional'...
PPS: I know ZPT ;-)

--
BLOWFISH n. - Preference for beef



___
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] Re: 2.3.3 - 2.5.1b2 upgrade problem

2002-04-17 Thread Shane Hathaway

Simon Michael wrote:
 R. David Murray [EMAIL PROTECTED] writes:
 
Probably, but I naively imagined that I was sophisticated enough
to be finding a real problem...but I'm obviously not smart enough
to realize that a breakage this fundamental could be due to a package
like ZDebug.
 
 
 I wasn't either.. I think the word is getting around now, but it would be
 great to see ZDebug updated to work with newer zope versions. I really
 miss it.

Now you see the pitfalls of creating a monkey-patch product. :-)

I've been putting in code for Zope 2.6 that replaces the functionality 
of ZDebug.  ZDebug was always woefully unsafe.  Zope 2.6 will have 
improved tracebacks.

Shane



___
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] Speaking of 2.6...

2002-04-17 Thread Dan L. Pierson



--On Wednesday, April 17, 2002 11:48:12 AM -0400 Brian Lloyd 
[EMAIL PROTECTED] wrote:

 We've already learned the hard way that the existing SiteRoots
 and VirtualHostMonsters etc. confuse people. This is partly due
 to under-documentation, but it is also partly because of the
 here, we'll give you several ways to do it! approach.

True, but...

 If there are strong reasons for it to be in the core, then I
 suspect it would need to be sufficient to be the official
 VH solution and we'd want to deprecate the existing things.
 That means that it will need to be well documented, and we'll
 need to produce the needed deprecation docs, transition guides,
 etc.

Replacing VirtualHostMonster with VirtualHostFolder (via deprecation,
etc.) might be a good decision but please remember those of us
who need to use the SiteRoot/access rule combo to do more than
can be done with the higher level tools.  SiteRoots and access rules
are primitives that can not be replaced by higher level simple
tools.

Dan Pierson



___
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] Speaking of 2.6...

2002-04-17 Thread Chris Withers

Lennart Regebro wrote:
 
 Yup. Therefore I think that the host monster shouldn't be included. VHF
 should supercede it.
 
 If backwards compatibility is desired, add warning messages for usage and
 remove the VHM from the add box, but continue to include it in the code. :-)

Just as a passing comment from an extensive user of the normal virtual host
monster:

What you're suggesting sux badly, please leave it as it is!

cheers,

Chris


___
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] Re: 2.3.3 - 2.5.1b2 upgrade problem

2002-04-17 Thread Chris Withers

Shane Hathaway wrote:
 
 I've been putting in code for Zope 2.6 that replaces the functionality
 of ZDebug.  ZDebug was always woefully unsafe.  Zope 2.6 will have
 improved tracebacks.

Does that mean we can turn them off when we don't want them and there's no more
of that damn awful appending them to the end of every page and creating broken
HTML?

please? pretty please? ;-)

cheers,

Chris


___
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] Speaking of 2.6...

2002-04-17 Thread Jeffrey P Shell

On 4/17/02 9:56 AM, Gary Poster [EMAIL PROTECTED] wrote:

 On Wednesday 17 April 2002 11:48 am, Brian Lloyd wrote:
 
 Ok :) As far as vetting virtual host folder, my concerns
 boil down to:
 
   a. dependency / requirement for ordered folder
 
   b. having yet another virtual host thing in the
  core will confuse people
 
 ...
 
 Hey Brian.  Thanks for your response.
 
 All points understood and appreciated.
 
 And I guess, then, that I'll choose not to make that commitment, since I'm
 looking forward to Zope3 these days anyway.
 
 If folks still want OrderedFolder (or, at least ordering capability) in the
 core I'm still willing to help with that.

I'm a little surprised this hasn't come up for inclusion earlier.  When
showing a site to some top-management folk in a previous life, the question
that came up most often was can we organize those links on the side so that
blablabla is first?.  One person would ask it, I'd respond with the hmmm,
not easily - at least, not in time for our deployment date.  Then the next
person would come in late to the meeting, ask the same question, we'd laugh
and tell them the scenario - to make admin easy, it's just listing the
documents in that folder that are public, using the API's already
available!.  They'd go OK.  The tour continued.  Another straggler comes
in, the loop repeated itself...  :).

For add-to-the-core functionality, I'll vote +0.5.  I wouldn't mind seeing
it in the core, but I also like the idea someone mentioned of a sort of
expansion pack of other good products that was well maintained alongside
each core release.

-- 
Jeffrey P Shell 
www.cuemedia.com



___
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] Speaking of 2.6...

2002-04-17 Thread Anthony Baxter


 Brian Lloyd wrote
 We've been trying hard to adopt this bit of Zen. If you write 
 REQUEST.set, you can look at it and easily see what is happening. 
 Same with SESSION.set. 

The other reason why I made SESSION all shouty-caps in SQLSession[*]
is to make it _very_ obvious when it's being used. Storing stuff in 
a session is often one of the critical bits of a web request, so it's
important to me that it be clear and easy to see this.

Anthony

[*] I assume the standard Zope session stuff has adopted the SESSION
convention now? it wasn't in CST

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.




___
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] Speaking of 2.6...

2002-04-17 Thread Anthony Baxter


 Toby Dickenson wrote
 Do you remember what we had to type to achieve the equivalent of
 dtml-let, before dtml-let was introduced? That *was* horrible.

gee, I dunno...
dtml-with _.namespace(name='foo') /dtml-with
has a sort of charm to it. 

sheesh, it's still not as ugly as ZPT.

deliberately-trolling-for-ChrisW-ly yrs,
Anthony

-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.




___
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] Re: 2.3.3 - 2.5.1b2 upgrade problem

2002-04-17 Thread Shane Hathaway

On Wed, 17 Apr 2002, Chris Withers wrote:

 Shane Hathaway wrote:
 
  I've been putting in code for Zope 2.6 that replaces the functionality
  of ZDebug.  ZDebug was always woefully unsafe.  Zope 2.6 will have
  improved tracebacks.

 Does that mean we can turn them off when we don't want them and there's no more
 of that damn awful appending them to the end of every page and creating broken
 HTML?

 please? pretty please? ;-)

http://dev.zope.org/Wikis/DevSite/Proposals/BetterTracebacks

All the work described (besides the documentation and Dieter's suggestion
of adding error_tb to the default standard_error_message) is checked into
the trunk.  No more invalid HTML. :-)

Shane



___
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] how bad are per-request-write-transactions

2002-04-17 Thread Chris McDonough

 That's only if you do it as a property.  It doesn't have to be done that
 way.  Shane and I discussed a counter that existed as a central
 datastructure.  Objects that were being counted would simply have
 methods to increment the count and display the count.

FWIW, this already mostly exists in Zope as the (tiny) BTrees.Length.Length
class.  It's a awfully nifty little piece of code.  Anybody who is
interested should read it and try to understand it because it's subtly
mindbending and ingenious and it is a prime example of why we love Jim. ;-)

 Completely agreed.  My disagreement is portraying the counter problem as
 impossible with the zodb.  I think some people, as evidenced by some of
 the responses, are willing to live with the tradeoffs.  Other people
 will find managing a log file on disk to be a more manageable solution.

It would be best to make make a dual-mode undoing and nonundoing storage on
a per-object basis.  But a half step would be to make it easier to use
mounted storages ala
http://dev.zope.org/Wikis/DevSite/Proposals/StorageAndConnectionTypeRegistri
es.





___
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] Speaking of 2.6...

2002-04-17 Thread Evan Simpson

Lennart Regebro wrote:
  There is an alternative, and that is to clean up the enhanced
  enhanced virtual host monster we at Torped have done. It's based on
  sfm@imemes enhanced VHM and just like VHF is makes it possible to
  have standalone virtual hosting without strange apache magic. We
  added an API to translate virtual to physical paths and back.

Just so you know, a limited version of the imeme enhancements is in the
Zope 2.5 VHM, and there is a standard REQUEST API consisting of
physicalPathToVirtualPath, physicalPathToURL, and physicalPathFromURL.

Cheers,

Evan @ 4-am



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