Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: CMF
Cleaning up imports, question about odd "feature"
 

Index | Next | Previous | View Flat


tseaver at palladion

Dec 27, 2008, 10:45 AM


Views: 721
Permalink
Cleaning up imports, question about odd "feature"

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

After spelunking through the maze of imports in the Zope2 core
indirected throught the Globals module, I resolved to rip out all such
imports (see a separate thread on zope-deve). I also want to clean them
out of the CMF trunk, and so have been hunting through code which does
'from Globals import' and 'import Globals'.

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

This is largely in aid of improving the dependency analysis of the parts
of the Zope2 core, but I think the practice is better, anyway.


Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 tseaver[at]palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJVne1+gerLs4ltQ4RAiTeAJoDTy4CkmD3nJu5UDx2EPPR2FQYNgCfYpqm
mJnaA/TX1ZTcOm8Qzq6JMYw=
=T1st
-----END PGP SIGNATURE-----

_______________________________________________
Zope-CMF maillist - Zope-CMF[at]lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

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

Subject User Time
Cleaning up imports, question about odd "feature" tseaver at palladion Dec 27, 2008, 10:45 AM
    Re: Cleaning up imports, question about odd "feature" jens at dataflake Dec 27, 2008, 11:03 AM
        Re: Cleaning up imports, question about odd "feature" charlie at begeistert Dec 29, 2008, 6:18 AM
    Re: Cleaning up imports, question about odd "feature" jens at dataflake Dec 29, 2008, 7:02 AM
        Re: Cleaning up imports, question about odd "feature" charlie at begeistert Dec 29, 2008, 7:18 AM
    Re: Cleaning up imports, question about odd "feature" tseaver at palladion Dec 29, 2008, 10:20 AM
        Re: Cleaning up imports, question about odd "feature" charlie at begeistert Dec 30, 2008, 4:17 AM
    Re: Cleaning up imports, question about odd "feature" dieter at handshake Jan 6, 2009, 9:16 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.