Re: [Zope-CMF] Cleaning up imports, question about odd feature

2009-01-06 Thread Dieter Maurer
Charlie Clark wrote at 2008-12-30 13:17 +0100:
Am 29.12.2008 um 19:20 schrieb Tres Seaver:

 As Jens noted, this change is for FSProperties and FSSQLMethods only.

Yep, and these aren't generally objects that need to be changed  
frequently in the FS.

But if possible, all FS* objects should behave identically with respect
to debug-mode on. It should not be the case that, e.g., FSPageTemplate
is reread in debug mode but FSProperties is not.



-- 
Dieter
___
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests


Re: [Zope-CMF] Cleaning up imports, question about odd feature

2008-12-30 Thread Charlie Clark

Am 29.12.2008 um 19:20 schrieb Tres Seaver:

 As Jens noted, this change is for FSProperties and FSSQLMethods only.

Yep, and these aren't generally objects that need to be changed  
frequently in the FS.

 On another and only slightly related note: Tres, in September I seem
 to remember you saying that the biggest stumbling block for moving to
 Python 2.5 and beyond was support for RestrictedPython implements,  
 ie.
 PythonScripts. If this is the case, do we need to add deprecating
 PythonScripts/untrusted code to the roadmap?

 I don't have that appetite at the CMF level:  I think much of the work
 has actually been done to ensure that RP works under Python 2.5+  
 already
 at the Zope level.

It's good to know that they will still work with Python 2.5. My own  
introduction to Zope was heavily dependent upon combining  
PythonScripts and PageTemplates and I'm currently seconded to a .NET  
based CMS which has something remarkably similar: they are a very  
useful way of encapsulating site-specific behaviour so it would be  
nice to have them around in one form or other if the associated issues  
(security, global validity, etc. can be resolved) otherwise some  
bright spark's bound to reinvent them!

You are, of course, right that this wouldn't be a CMF only issue but I  
think that it's something we should be thinking of once we have a  
complete set of experimental browser views. looks appropriately  
guilty/

 from AccessControl import ClassSecurityInfo

 becomes:

 from AccessControl.SecurityInfo import ClassSecurityInfo
 +1


 I didn't realise this counts as a relative import but I'm all in
 favour of spelling things out.

 That one isn't relative:  it is just another façade import.


Façade imports are where classes and modules are populated through a  
package's __init__.py or module?

Charlie
--
Charlie Clark
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-938-5360
GSM: +49-178-782-6226



___
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests


Re: [Zope-CMF] Cleaning up imports, question about odd feature

2008-12-27 Thread Jens Vagelpohl
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On Dec 27, 2008, at 19:45 , Tres Seaver wrote:

 I have found a couple of oddities:  both CMFCore.FSPropertiesObject  
 and
 CMFCore.FSSQLMethod use Globals.Development mode to decide whether or
 not to give their class an '__of__' method.  I don't recall the
 rationale, but it has been around *forever*, AFAICT.  I would like to
 rip it out, and just make the '__of__' method there always, unless
 somebody has a good argument for the current status.

I always thought it was there to continually re-read the filesystem  
representation upon access, so any filesystem changes are reflected  
without restarting the instance. As to the usefulness, I'm not relying  
on it when I do development. I always restart.


 I also plan to make all the currently relative imports absolute, since
 relative imports break under later versions of Python, and I am making
 some of them more precise:  e.g.:

  from AccessControl import ClassSecurityInfo

 becomes:

  from AccessControl.SecurityInfo import ClassSecurityInfo

+1

jens



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.8 (Darwin)

iEYEARECAAYFAklWfAsACgkQRAx5nvEhZLKF6gCfbAiOvshC/jieG8+4UmTsyYH7
AR8An2DsvoQ9ELqaRRG2LQPGFXOoIk+k
=9Md6
-END PGP SIGNATURE-
___
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests