Re: [Zope-dev] Acquisition Confusion :S

2000-08-14 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] - never expose a "bare" object, or even one with an incomplete context Why? You can get at it through aq_base anyway, surely? Only from unrestricted code. DTML and (CVS) Python Methods only let you access aq_parent. This only applies to objects that

[Zope-dev] Re: Acquisition ( slightly less Confusion ;-)

2000-08-17 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] Ah, okay... so really, prettymuch all Zope objects should be wrapped with only one or two exceptions, most of which aren't actually objects as such but simple data types? Yes. Also, there is a very limited range of "natural" ways to construct the

Re: [Zope-dev] Still no safe seperators :P

2000-08-17 Thread Evan Simpson
From: "Chris Withers" [EMAIL PROTECTED] Looks like the colon it is then, there's even a patch now ;-) There a patch sitting around waiting for DTML syntaxgeddon which allows slash-separated paths in object names everywhere, not just in entity syntax. That could easily be extended to also allow

[Zope-dev] Re: Virtual Hosting in 2.2 - a Bestiary of Buglets

2000-09-05 Thread Evan Simpson
From: Itamar Shtull-Trauring [EMAIL PROTECTED] Problem 1: HTTP and HTTPS (more of a proxypass issue) === I want to be able to serve both http and https versions of a site from Apache. Problem is, because of the way proxying works, there is

[Zope-dev] Re: SiteAccess 2 Questions

2000-09-05 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] It looks like REQUEST.steps is the replacement for PARENTS? Is that so? Actually, REQUEST.steps has always been there -- it's the list of *ids* that were traversed. This may or may not correspond to the ids of the PARENTS, depending on whether an object

Re: [Zope-dev] PATH_TRANSLATED delimted with backslash ?

2000-09-09 Thread Evan Simpson
From: "Steve Alexander" [EMAIL PROTECTED] obj = self.restrictedTraverse(REQUEST.PATH_TRANSLATED) This stopped working when I tried the software on Windows. Bug or feature? I'm not sure, but I'm *very* curious what you're trying to accomplish with this code. A better equivalent would

Re: [Zope-dev] is INSTANCE_HOME broken on Win32?

2000-09-11 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] I'm trying to make Squishdot work with INSTANCE_HOME nicely. However, the testing is going wrong on a normal Win32 Install... I had lots of lines that went something like: f=open('%s/Products/%s.dtml' % (SOFTWARE_HOME,file)) Which generates:

Re: [Zope-dev] HiperDOM xmlc

2000-09-18 Thread Evan Simpson
From: Phillip J. Eby [EMAIL PROTECTED] [snip description] The effective external behavior of these two attributes, would be to let a web designer load and save any page or template they wished in the site, freely making changes to the header, footer, or various embedded elements thereof, and

Re: [Zope-dev] Adding functions to _

2000-09-18 Thread Evan Simpson
From: Itamar Shtull-Trauring [EMAIL PROTECTED] However, when I call the function, I get an error about DocumentTemplate, from which I discovered that when I call _.logvis('a_string'), instead of the string being passed as the first parameter, _ is passed as the first parameter to my function,

[Zope-dev] Re: more __call__ ...

2000-09-26 Thread Evan Simpson
From: "Jim Fulton" [EMAIL PROTECTED] We are going to provide an alternate interface, so that if an object has a special method, then this will be called instead. okay... which proposal/project is this in? I don't remember. Evan? PythonMethods, essentially, unless you'd really like me

Re: [Zope-dev] Re: more __call__ ...

2000-09-26 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] Evan Simpson wrote: PythonMethods, essentially, unless you'd really like me to make this a separate project. It's *such* a small change, tho. No, not at all, just where I can find some docs for this specific bit would be more than sufficient

Re: [Zope-dev] Help, please!!! __call__ problems with DTML templates

2000-10-10 Thread Evan Simpson
From: Stephen Simmons [EMAIL PROTECTED] 1.) How do you magically get the DTML context from 'dtml-var A' without having to resort to 'dtml-var "A(_,REQUEST)"' in the templates? A.isDocTemp = 1 # or make it a shared class attribute 2.) How to convert an arbitrary text string into rendered

[Zope-dev] SiteAccess + ZCatalog Project

2000-11-07 Thread Evan Simpson
Those of you who use SiteAccess, or any other virtual hosting solution, with ZCatalog (including Squishdot, ZUBB, and other ZCatalog-dependent products) should check out this new project: http://dev.zope.org/Wikis/DevSite/Projects/ZCatalogVirtualHostFix This proposes a set of changes and an

Re: [Zope-dev] PythonMethods: Can't Slice context.REQUEST.PARENTS

2000-11-13 Thread Evan Simpson
From: The Doctor What [EMAIL PROTECTED] Using context.this().id, self.this().id, m_self.this().id all get me the same things: Folder, Zope, and my method. None give me the DTML Document foo_html. This would seem to be an important thing. The only information about your caller that you can

[Zope-dev] Re: [Zope] IE5 / Medusa bug?

2000-12-14 Thread Evan Simpson
From: seb bacon [EMAIL PROTECTED] I imagine the fact that I can make it work by adding index_html is the most telling point, but it's not telling me anything ;) Leaving off index_html causes Zope to add a base href to the head. That's the only difference I can think of. Your page doesn't get

Re: [Zope-dev] urllib not available in Python Scripts?

2000-12-15 Thread Evan Simpson
From: Itai Tavor [EMAIL PROTECTED] In Python Methods I could do urllib.quote(...). This doesn't work in Python Scripts. Is quote considered a security risk? No, but only the modules available to DTML are importable by default. You would need to provide security declarations in order to

Re: [Zope-dev] urllib not available in Python Scripts?

2000-12-17 Thread Evan Simpson
From: "Itai Tavor" [EMAIL PROTECTED] import urllib urllib.__allow_access_to_unprotected_subobjects__ = 1 Ok, this is simple enough, and it works. But... it opens access to everything in urllib. For now, the best way is to use a dictionary of names, like this: import urllib

Re: [Zope-dev] Changing hostname and port without SiteAccess

2000-12-18 Thread Evan Simpson
From: Martin Winkler [EMAIL PROTECTED] I cannot use SiteAccess (because I need multiple ZCatalogs) To the extent that you can't use SiteAccess with ZCatalogs, you will also not be able to use any other solution (until ZCatalogs are fixed, hopefully in 2.3). The problem with ZCatalogs is not

[Zope-dev] Product Authors: If you use ZCatalog, READ! (that means you, Chris W. :-)

2000-12-18 Thread Evan Simpson
From: The Doctor What [EMAIL PROTECTED] I would happy to, it looks like it does what I need (having siteaccess). However, I don't see a clear cut description what's changing and how. What needs to be done (in easy to understand language) to make sure it all goes smooth, etc. It's one step

Re: [Zope-dev] Import with INSTANCE_HOME?

2001-01-03 Thread Evan Simpson
From: BS [EMAIL PROTECTED] Can anyone tell me how to do a "from Products.ZPatterns import anything" when using INSTANCE_HOME? Do I have to add the INSTANCE_HOME path to sys.path? As long as Python has already imported Zope (i.e. you're in another Product) you don't need to do anything

[Zope-dev] Re: [Zope] Lobbying (was: [Zope] html_quote in python methods?)

2001-01-04 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] Only if you add security declarations to expose functionality from xmlrpclib. Is that hacky and nasty? :-S In Zope 2.3, you place the following code somewhere that it will get executed at startup (a custom Product's __init__ is the best bet): from

[Zope-dev] Python Scripts update

2001-01-04 Thread Evan Simpson
Python Scripts have gone through a fair number of changes and bugfixes recently. They should now work properly as methods of ZClasses. When you download the source of a Python Script, the title, parameter list, and bindings are added to the source in the form of specially formatted comments.

Re: [Zope-dev] Problem: manage_workspace redirects to index_html

2001-02-04 Thread Evan Simpson
From: "Dylan Jay" [EMAIL PROTECTED] I'm using IE 5.01 on w2k. The current 5.01 version of IE doesn't do basic authentication correctly (or, at least, the way nearly every other version, and browser, does it). Try getting 5.5sp1 instead. Cheers, Evan @ digicool 4-am

Re: [Zope-dev] Virtual Host Monster Paranoia

2001-02-13 Thread Evan Simpson
From: "Chris Withers" [EMAIL PROTECTED] Well, it's easy enough to find out if a site is running Zope, then this becomes pretty easy attack to think of I'm not going to claim that this is perfectly harmless, but I can't think of any way in which this could be termed an "attack". You can

Re: [Zope-dev] ProxyPass and SiteAccess getting REMOTE_ADDR

2001-02-13 Thread Evan Simpson
From: Oliver Bleutgen [EMAIL PROTECTED] Btw. with a small module it's even possible to log the usernames with apache, something medusa isn't capabable of afaik (as of zope version 2.3). Cool! What module is this, and how do you use it? Cheers, Evan @ digicool 4-am

Re: [Zope-dev] Waaagh! Python Script won't allow __setitem__

2001-02-19 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] I've got an object which implements __setitem__ in such a way that it's perfectly safe for use in Python Scripts. Sadly, it seems that Evan's Byte Code hacks won't let me do this :-( The only way that the security code can know that your __setitem__ is

Re: [Zope-dev] Waaagh! Python Script won't allow __setitem__

2001-02-19 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] But what's so bad about type()?! When applied to an Extension Class, it gives you access to the actual class, rather than a nice inert type. Cheers, Evan @ digicool 4-am ___ Zope-Dev maillist - [EMAIL

Re: [Zope-dev] Python Scripts Bug Question

2001-02-20 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] The Bug: If I use an name other than 'context' to bind to context, I quite often (but not always :-S) get a KeyError on that name. I'll check this out. It's in the Collector, right? The Question: If I'm calling a Python Script from a Python Product

Re: [Zope-dev] Python Scripts Bug Question

2001-02-20 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] Cool :-) And even though I pass it in as _, it'll get bound to whatever is specified on the bindings tab, right? Nope. If you called it "fred" on the bindings tab, pass it as "fred". Cheers, Evan @ digicool 4-am

Re: [Zope-dev] Python Scripts Bug Question

2001-02-20 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] I'm calling a python script with the context bound to, lets say, 'fred'. I call the python script like this: result = self.aq_acquire(variable_containing_name_of_PS)(a_dictionary) ...where self is an instance of my python product, and a_dictionary, is,

Re: [Zope-dev] REQUEST.steps

2001-02-28 Thread Evan Simpson
REQUEST has a lot of standard attributes and keys, some of which are obsolete. Deprecated attributes: o script: URL for the root object, computed from environment variables including SCRIPT_NAME. Replace with REQUEST['BASE1'] or REQUEST['BASEPATH1'] o base: URL for level above root object,

Re: [Zope-dev] Site Access Rewrite Rule documentation?

2001-03-03 Thread Evan Simpson
From: "R. David Murray " [EMAIL PROTECTED] So, clearly I don't have a clue what stack is supposed to contain or what changing it does. Can anyone point me to docs or give me some help? You can also tell me, "that's stupid, just solve your problem this way"... You've got it almost right,

Re: [Zope-dev] ZPT trials and tribulations

2001-03-16 Thread Evan Simpson
From: "Phil Harris" [EMAIL PROTECTED] The problem is that I'm getting a traceback (I won't bore you with the details unless I have to) to the effect of 'ui' being unknown. Mmph. That release has a problem with exposing TAL variables to Python code. There will be a *much* better one Real Soon

Re: [Zope-dev] getPhysicalPath?

2001-03-16 Thread Evan Simpson
From: "Christian Scholz" [EMAIL PROTECTED] And can someone explain to us where the differences between aq_chain and getPhysicalPath() are? Actually getPhysicalPath() seems also to walk up aq_parent. Or am I missing something? "aq_chain" gives you a list of the objects traversed to get to your

Re: [Zope-dev] call pythonscript from python

2001-03-21 Thread Evan Simpson
From: "Tim McLaughlin" [EMAIL PROTECTED] Anybody know how I can call a pythonscript from python? Currently I can call it, but I seem to have no context or security context, because it either will not let me access anything or fail with an attribute error in the context. What are the params

[Zope-dev] ANN: Zope Page Templates 1.0.0 beta 1

2001-03-27 Thread Evan Simpson
The first beta release of ZPT is ready! Come read about them at http://dev.zope.org/Wikis/DevSite/Projects/ZPT, and download from http://www.zope.org/Members/4am/ZPT. These should be especially interesting for teams of Zope developersin whichthe programming and page/site design tasks are

Re: [Zope-dev] Page Templates and nested templates

2001-04-01 Thread Evan Simpson
From: "Johan Carlsson" [EMAIL PROTECTED] Would it be completely stupid to be able to nest Macros. That is, you would have one MainMacroTemplate defining several Slots/SubMacros and then make several SubMacrosTemplates that inherents from the MainMacroTemplate, defining the Slots/SubMacros as

Re: [Zope-dev] Page Templates: Any plan how to use PT's for I18n and browser dependant templates etc?

2001-04-02 Thread Evan Simpson
From: "Johan Carlsson" [EMAIL PROTECTED] As fas as I can see the METAL definitions are inside the template. That would mean one would some external service to route it to the correct template. For instance: use-macro="portalskins/macros/useme" portalskin in this case would return a

Re: [Zope-dev] Page Templates: Any plan how to use PT's for I18n and browser dependant templates etc?

2001-04-03 Thread Evan Simpson
From: "Johan Carlsson" [EMAIL PROTECTED] Now comes the tricky thing, case I want to render with the tal tags intact. I just tested that and they are intact after render. Jippi! This will be optional in ZPT 1.1, most likely. The next step I want to do is to save the template back to Zope and

[Zope-dev] Re: SiteAccess: virtual host monster and setServerURL issue

2001-04-10 Thread Evan Simpson
From: "Joseph Wayne Norton" [EMAIL PROTECTED] The correct virtual URL is not setup properly because the setServerURL method is always picking up the port #1080 (via oldhost,oldport) from the mod_proxy/mod_rewrite request environment even if HTTP_HOST does not contain a port number. This is

[Zope-dev] Re: SiteAccess: virtual host monster and setServerURL issue

2001-04-10 Thread Evan Simpson
From: "Joseph Wayne Norton" [EMAIL PROTECTED] The generated URLs should not have :80 in them and they do not ... rather they have :1080 included in the generated URLs although I have specifed something as follows: mod_rewrite result:

[Zope-dev] Two new proposals: InstallationAndConfiguration and PrefixedTagVariables

2001-04-12 Thread Evan Simpson
http://dev.zope.org/Wikis/DevSite/Proposals/InstallationAndConfiguration outlines a new process for installing and configuring Zope. http://dev.zope.org/Wikis/DevSite/Proposals/PrefixedTagVariables describes a variant of Tino's fix for sequence-item variables. Cheers, Evan @ digicool

[Zope-dev] ZPT 1.2, TAL 1.2, ZTUtils 1.0 Released

2001-04-27 Thread Evan Simpson
Actually, I uploaded these at 5pm today, then I had to run and catch a plane. I still haven't updated the Project wiki, but if you visit: http://www.zope.org/Members/4am/ZPT ...you can pick up the latest. You need to download all three; PageTemplates goes in a Products directory, TAL and

Re: [Zope-dev] ZPT 1.2, TAL 1.2, ZTUtils 1.0 Released

2001-04-29 Thread Evan Simpson
From: Frank Sonnemans [EMAIL PROTECTED] This update breaks my previously working code. My site master template calls a dtml component to render a simple menu. This worked with the previous release of ZPT, but now results in a Name Error for the PARENTS[] variable. What changed in the new

[Zope-dev] Re: Grrr... Python Scripts

2001-05-07 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] Where should I import CatalogError from? And _please_ don't tell me I have to go through some convoluted security process to do this :-( # After adding security decls from Catalog import CatalogError Use the same security process as providing access to

Re: [Zope-dev] Re: Grrr... Python Scripts

2001-05-11 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] Could that we added to PythonScripts/standard.py so I don't have to do it all the time? This is just part of a general security review that needs to happen. I suppose we need a place to collect suggestions about objects that ought to be exposed to

[Zope-dev] Re: [Zope] ANNOUNCE: Zope 2.4.0 alpha 1 released

2001-05-31 Thread Evan Simpson
- New restricted execution architecture A note about this for those who have run afoul of restrictions on builtins such as 'list', 'map', and 'range' in Scripts and DTML Python expressions: In the new architecture, there are (by default) no attempts to protect the system against excessive

Re: [Zope-dev] Bug in Zope VersionControl

2001-06-08 Thread Evan Simpson
From: Martijn Pieters [EMAIL PROTECTED] REQUEST['SCRIPT_NAME'] is the root of the Zope server. In a pure ZServer environment, this is '/'. In a situation where the Zope server is running behind another webserver, and is not at the root of that server, SCRIPT_NAME represents the path to the

[Zope-dev] Re: DTML-Python confusion (RE: [Zope] How to make a script return rendered dtml)

2001-06-13 Thread Evan Simpson
From: Bjorn Stabell [EMAIL PROTECTED] How do you do dtml-with and dtml-let in a Python script? (I.e. put something on the namespace) You can't. Scripts can use the DTML namespace in the same way that Python expressions in DTML can, but that's it. On the other hand, you can create (and pass

Re: [Zope-dev] Where did DocumentTemplate/VSEval.py go in 2.4.0a1?

2001-06-15 Thread Evan Simpson
Morten W. Petersen wrote: one of my products landed flat on its face when an ImportError was raised trying to import VSEval from DocumentTemplate; is there a new class / function of some sort or simply another name for the class? See $ZOPE/lib/python/RestrictedPython. That replaces both

Re: [Zope-dev] Where did DocumentTemplate/VSEval.py go in 2.4.0a1?

2001-06-18 Thread Evan Simpson
Michel Pelletier wrote: Should we make an alias for bw-compatability? This is now in the trunk, along with some other compatibility changes that allow Python Methods to continue working, courtesy of the NewZopeOrg migration project. Cheers, Evan @ digicool

[Zope-dev] Re: DTML-Python confusion (RE: [Zope] How to make a script return rendered dtml)

2001-06-14 Thread Evan Simpson
Bjorn Stabell wrote: Is it possible to append an object to the namespace? Isn't that what dtml-with does? It does, but there's some magic involved (non-mapping objects have to be wrapped in an adaptor first) and it uses an interface that isn't available in a restricted code environment

[Zope-dev] XXXPythonScripts release 1.0

2001-07-01 Thread Evan Simpson
After seeing the demand for this in a thread on ZopeZen, I've decided to release XXXPythonScripts, at: http://www.zope.org/Members/4am/XXXPythonScripts This Product adds a new Script meta-type: Script (Python, unsafe). You can only create or edit these objects when your Zope has been started

[Zope-dev] TALES in DTML

2001-07-13 Thread Evan Simpson
I've been given time to work on draft documentation changes for: http://dev.zope.org/Wikis/DevSite/Proposals/DTMLplusTALES If you're interested, now is the time to comment. Cheers, Evan @ digicool ___ Zope-Dev maillist - [EMAIL PROTECTED]

Re: [Zope-dev] Getting Unauthorized from __bobo_traverse__.

2001-09-12 Thread Evan Simpson
Steve Alexander wrote: ... which you can't use from restricted things like (Script) Pythons and DTML Methods. So, the answer lies in External Methods and Python Products. If only I could remember what the question was... There was a bug, fixed in 2.4.1, with restrictedTraverse across

Re: [Zope-dev] User Name in python script

2002-02-25 Thread Evan Simpson
Sebastian Sippl wrote: I need to get the name of the current user , in a python script In a recent Zope, you should be able to use: from AccessControl import getSecurityManager user = getSecurityManager().getUser() Cheers, Evan @ Zope ___

[Zope-dev] Re: typo in HTTPResponse.py

2002-03-15 Thread Evan Simpson
Christian Theune wrote: Hmm. Is it possible to implement some option to turn this off? I just checked in the ability to use HTTP_TRACEBACK_STYLE to control the appearance of tracebacks in non-debug mode errors: '' (default): Place it in an HTML comment 'none': Omit it 'plain': Include it as

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

Re: [Zope-dev] Re: [ZPT] Order of attribute execution Feature Request

2002-05-10 Thread Evan Simpson
Jim Penny wrote: I have also said that, while ZPT is not as warty as DTML, ZPT looks, on the surface, to be pretty ugly. I have said that there are three specific things I dislike about ZPT -- 0) lots of things have changed spelling again -- request v. REQUEST, here v. context v. container

[Zope-dev] Re: Only anonymous in an Access Rule?

2002-09-30 Thread Evan Simpson
Chris Withers wrote: How come getSecurityManager().getUser() returns the Anonymous User in access rules? Surely some checks must have been done to see whether the folder containing the access rule can be traversed to? If not, then huh? I'm confused :-( Access Rules trigger during

[Zope-dev] Re: Strange Bug in Scripts (Python) and Python code ...

2002-10-22 Thread Evan Simpson
Joachim Werner wrote: These few lines brought the Zope server (and the Browser I used for testing) to a halt: html = '' for letter in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ': html += '|'.join([html, letter]) return html This computes a string O(2^26) in length. Scripts make very little attempt to

[Zope-dev] Re: bug in mapply.py?

2002-11-05 Thread Evan Simpson
Tim Hicks wrote: Given a call signature like: def method(self, *args, **kw) In this way, mapply.py seems to ignore the fact that I want my method to accept an arbitrary number of arguments (line 69). When mapply was written, its only purpose was to map explicit method parameters to request

[Zope-dev] Infuriating ZClass registry Heisenbug

2002-12-10 Thread Evan Simpson
This past weekend I migrated a bunch of ZClasses and the web site that uses them from a scratch Zope instance into my production instance. Both run off the same 2.6 CVS branch checkout, connecting to ZEO servers running from the same ZEO trunk checkout. For a while after starting the server,

Re: [Zope-dev] Infuriating ZClass registry Heisenbug

2002-12-10 Thread Evan Simpson
Shane Hathaway wrote: My first recommendation would be to turn your ZClass registry into an OOBTree. OOBTree has been maintained and updated. Good thought, but no dice. Since it is rebuilding the registry on every restart anyway, I went ahead and made the changes to my OFS/Application.py. I

Re: [Zope-dev] Infuriating ZClass registry Heisenbug

2002-12-11 Thread Evan Simpson
Shane Hathaway wrote: Shot in the dark #2: Does it enter the ClassFactory function in Zope.ClassFactory? That's part of the ZClass magic... although there are two ways that the pickler tries to load classes. ZODB only tries to load Persistent instances as ZClasses. If there are things

Re: [Zope-dev] Infuriating ZClass registry Heisenbug

2002-12-11 Thread Evan Simpson
More data: It may well be loading correctly, but it seems to be storing incorrectly. I managed to grab the ZGlobals pickle string, and it has the _zclass_ stored as a plain class instead of an oid. I copied the commented-out Python persistent_id() in ZODB/Connections.py into a method called

Re: [Zope-dev] Infuriating ZClass registry Heisenbug

2002-12-11 Thread Evan Simpson
I think I've fixed my ZGlobals, but there's definitely a problem in coptimizations. I made Connections.py use the Python persistent_id, restarted twice, and ZGlobals was fine on the second restart. Whew, Evan @ 4-am ___ Zope-Dev maillist -

Re: [Zope-dev] Infuriating ZClass registry Heisenbug

2002-12-16 Thread Evan Simpson
My trunk and 2.6 sandboxes are now behaving themselves. Thanks, guys! ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists -

[Zope-dev] Re: [Vote] PEP308 voting began

2003-03-04 Thread Evan Simpson
Guido van Rossum wrote: IMO TALES should solve this for itself by introducing an if/then/else expression form rather than depending on Python. If you can have a not:.. expression, surely you can have an if:..:then:..:else:.. expression. Now that you point it out, it's not even hard. Here's a

[Zope-dev] Re: [Zope] Re: Proposed installation changes for review

2003-03-11 Thread Evan Simpson
Guido van Rossum wrote: Well, in a typical installation, you won't be running ZEO on the same machine as Zope, right? ZEO has its own install and config stuff, which is very similar to that for Zope, but ZEO is not installed as part of the main Zope install. I routinely run ZEO on all of my

[Zope-dev] Re: Post-authentication hook

2003-06-10 Thread Evan Simpson
Dieter Maurer wrote: We had discussed the post-authentication hook in connection with role based skin selection but we never had it implemented. I have, and it even fits here in the margin. Shall I pop it into the Collector? 242a243 self._post_traverse = post_traverse = [] 363a365

Re: [Zope-dev] Re: Post-authentication hook

2003-06-10 Thread Evan Simpson
robert wrote: Please do Okeydoke: it's Issue #935. ___ 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

[Zope-dev] Re: weak examples, weak exploits

2003-06-23 Thread Evan Simpson
Casey Duncan wrote: I would be in favor of making the Examples opt-in like the Zope tutorial. It seems silly to have it in evey ZODB by default. Make people add it if they want it. Many, many moons ago I created evan-examples-branch, which allows individual Products to offer sample code without

[Zope-dev] Re: weak examples, weak exploits

2003-06-24 Thread Evan Simpson
Shane Hathaway wrote: This seems like a fine idea, but what action would the user take to install examples and extras? In my initial implementation, there was a separate page that listed the names and descriptions of the various examples, with links to install them. If I recall correctly, this

[Zope-dev] Re: TALES idea: tuple unpacking

2003-07-23 Thread Evan Simpson
Jim Penny wrote: Hate this. Looks like a typecast of some kind, int is way to overused for this. If you must, why not index: ? Hmmm. I hadn't thought of that before, but I've certainly wanted to tell the path traverser whether to use attribute, index, or key access on several occasions

[Zope-dev] Re: TALES idea: tuple unpacking

2003-07-29 Thread Evan Simpson
OK, I've checked in a sample implementation on evan-pathprefix-branch. It allows for registering prefixes with: from Products.PageTemplates.PathPrefixes import registerSubPathPrefix registerSubPathPrefix('call', call_compiler, call_handler) It includes an implementation of 'var:', 'call:',

[Zope-dev] Re: TALES idea: tuple unpacking

2003-07-29 Thread Evan Simpson
Jim Penny wrote: But, what does all of this have to do with index:, key:, int:, etc.? index: and key: are particularly interesting, in that they use different syntax for something that python conflates syntactically. That is, an integer indexed reference looks exactly like a string indexed

[Zope-dev] Re: TALES idea: tuple unpacking

2003-07-30 Thread Evan Simpson
Jim Penny wrote: Well, that is exactly why it will be more confusing to everyone. A python programmer is not expecting them to be different, and a non-programmer has no idea of what keys and indices are, much less how they differ. The explanation isn't that hard, at least for a user with a basic

[Zope-dev] Re: simpler TALES. (was Re: TALES idea: tuple unpacking)

2003-07-30 Thread Evan Simpson
Paul Winkler wrote: you don't :) it's a convenience (less stuff to type if you access the object a lot) and/or an optimization (getSomeObject might be expensive). I believe that his example referred to the case where the intermediate object must be called before path traversal can continue.

Re: [Zope-dev] Re: simpler TALES. (was Re: TALES idea: tuple unpacking)

2003-07-30 Thread Evan Simpson
Shane Hathaway wrote: FWIW, I'd write this as here/call:getSomeObject/someAttribute. I suppose it's possible to support both. One interesting difference is that my syntax says both get an attribute and call it, while yours says only call it. Mine is a method call, while yours is a function

[Zope-dev] Re: TALES idea: tuple unpacking

2003-07-31 Thread Evan Simpson
Chris Withers wrote: How would this interact with the Adapters stuff implements in Zope 3's TALES? It wouldn't -- this is a Zope 2 implementation. OK, I know what you mean, but I don't know enough about the Zope 3 implementation to make an informed response. Wouldn't Zope 2's lack of the

[Zope-dev] PythonLibraries Product

2003-09-08 Thread Evan Simpson
I'm thinking seriously about writing a Product to provide collections of Python functions defined by a single source text -- PythonLibraries. This would *not* be the same as Zope 3's persistent modules, although it would provide some of the same benefits. Here's the README.txt: Python

Re: [Zope-dev] PythonLibraries Product

2003-09-11 Thread Evan Simpson
Tres Seaver wrote: Hmm, I'm thinking about this for the CMF. In CMF 1.3.x, a template which has a cache manager, or a title, puts those values in a simple 'name=value'-formatted file, with extension '.properties'. Permission mappings go in a separate file, with extension '.security'. I wish I

[Zope-dev] New-style classes and Persistence?

2003-09-11 Thread Evan Simpson
What's the latest word on mixing new-style classes and Persistence? I'm finding type subclassing to be extremely useful in PythonLibraries, but so far I'm only using them for non-persistent objects. For part of what I'm doing, though, it would be nice to be able to chuck the old

[Zope-dev] Re: 2.7.0-b2 - Critical ZPT TAL bug when using content-type text/xml

2003-09-22 Thread Evan Simpson
Richard Waid wrote: Basically, if you're using a ZPT with a content-type text/xml, using a TAL path expression to access an attribute or method causes a security violation (Unauthorized). It does not happen if the ZPT is using content-type text/html. Ah, guarded_getattr is doing something wrong

[Zope-dev] Re: 2.7.0-b2 - Critical ZPT TAL bug when using content-type text/xml

2003-09-22 Thread Evan Simpson
Until cAccessControl.c is fixed, you can work around the problem with a simple patch to Products/PageTemplates/Expressions.py, in restrictedTraverse(): if isinstance(name, TupleType): object = object(*name) continue + + name = str(name) if

[Zope-dev] Re: Zope 2.7.0 b3 regressions

2003-12-03 Thread Evan Simpson
Lennart Regebro wrote: I will check this into head this evening, and unless people scream tomorrow I will check it into the 2.7 branch. Please hold off. I've been meaning to revisit this for a while, and I have a bit of time to do so today and tomorrow. Also, virtual hosting is properly the

[Zope-dev] Re: Zope 2.7.0 b3 regressions

2003-12-03 Thread Evan Simpson
Yuppie wrote: You introduced that concept in Zope 2.7. The method docstring is part of your change. Before Zope 2.7, absolute_url was defined different, worked different and was used different in products maintained by ZC. [snip] I don't think the old API was better. I'm just saying that you

[Zope-dev] Re: Zope 2.7.0 b3 regressions

2003-12-07 Thread Evan Simpson
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

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

2003-12-09 Thread Evan Simpson
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

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] Re: On with the show....

2003-12-15 Thread Evan Simpson
Sidnei da Silva wrote: If you look at FSPageTemplate, its obvious that it doesn't subclass ZopePageTemplate, but the solution is not so obvious. Using: pt_getContext = ZopePageTemplate.pt_getContext.im_func Wow, FSPageTemplate is lousy with this sort of thing, isn't it? I'd have spelled it

[Zope-dev] Re: RestrictedPython globalization change

2004-01-02 Thread Evan Simpson
Tres Seaver wrote: I was just looking with Shane at the code you added in November to address http://collector.zope.org/Zope/445 . It seems to me that this bit of majyk is just confusing, and makes PythonScripts even less like normal Python functions; the actual submitter could easily fix his

[Zope-dev] Re: RFC: backward compatibility of PythonScript bindings for 2.6.4 / 2.7.0

2004-01-21 Thread Evan Simpson
Jeremy Hylton wrote: What if you used a special object that would produce a useful error message if the user tries to access the container. I like this. Make it a singleton, and put it in the global namespace for Scripts, so that we can write: if context is Inaccessible: # Do without

[Zope-dev] Re: Zope 2.7.0 rc2 + python 2.3.3 problem

2004-02-03 Thread Evan Simpson
Tim Peters wrote: The globals set up for running the script appear not to contain a '__file__' key, and have a '__name__' key explicitly set to None. If it set either of these to something useful, or didn't have a '__name__' key explicitly set to None, warning.warn() would have been able to make

Re: [Zope-dev] Re: Zope 2.7.0 rc2 + python 2.3.3 problem

2004-02-03 Thread Evan Simpson
Tim Peters wrote: it *looks* like you could leave name None, but set '__file__' to something (non-None) explicitly. Thanks! This seems to do the trick, and I have a unit test that fails before and passes after the change. While creating the test, though, I ran across some disturbing behavior.

[Zope-dev] TypeErrors during 'make test'

2004-02-13 Thread Evan Simpson
I'm getting several TypeErrors when I run 'make test' on the HEAD. Each of them involves a call to cAccessControl's 'validate' with 'roles' set to a PermissionRole instance, complaining that it's not iterable. Any ideas? Cheers, Evan @ 4-am ___

[Zope-dev] Re: Zope 2.8

2004-02-20 Thread Evan Simpson
Christian Theune wrote: - Does a proposal for the post-traverse-hook have a chance for 2.8? (The code is here completely working on 2.7, I only need to write tests.) Please, write tests and merge to the HEAD. I see no reason why this shouldn't go into 2.8. Cheers, Evan @ 4-am

[Zope-dev] test.py

2004-03-10 Thread Evan Simpson
Jeremy Hylton wrote: Make sure App.Product is imported first, so that test.py can work. This change does not affect the old utilities/testrunner.py. This checkin message caused me to notice 'test.py' for the first time. Can you point me to any discussion/docs on it? When did/will it replace

[Zope-dev] Re: [ZPT] RFC: TALES adapters and TAL/Tales variable namespaces

2004-05-19 Thread Evan Simpson
Jim Fulton wrote: I've posted two proposals: http://dev.zope.org/Zope3/TALESPathExpressionAdapters Proposes a mechanism for easily using adapters in TALES expressions. I'm not at all clear on how the proposed mechanism is superior to the implementation of path segment prefixes that exists in

<    1   2   3   >