|
From: will kahn-g. <wi...@bl...> - 2011-04-05 17:39:12
|
This is an easy fix--you just move the import for plugin_utils until where it's needed. Generally, tools should be a leaf module--it shouldn't be importing anything else in PyBlosxom. However the run_callbacks situation breaks that. At some point, I want to relocate the callback stuff, but that's outside the scope of 1.5. Are you seeing other circular dependency issues other than this one? On 04/05/2011 09:37 AM, Neil Santos wrote: > Been looking at liberally sprinkling logging support to a bunch of > modules. Now, wanting to start out nice and easy, I decided to start > with plugin_utils.py. > > Except tools.py import plugin_utils.py, and trying to use the logging > facilities in the latter causes Python to call me names and question my > lineage. And I don't like it when programming languages do that to > me. :P > > I've this notion of further breaking down various modules, to try and > get pyblosxom to the point that it's at least possible to include > logging in the various modules without circular dependencies causing me > to tear my hair out in sizable chunks. > > I'm not sure how attached anyone is to the current structure, so I'm > announcing my intention of doing so beforehand (to give way to > objections and such). > > This is, of course, a non-trivial change, hence this message. I feel > that this ought to be done before 1.5 is pushed out (with proper > deprecation messages and such where appropriate, of course), though I > wouldn't be suprised if this stretches far into 1.6, as I haven't really > taken a very close look at how big a job it is. > > I can probably post an update here if anyone's curious. > > If there are no objections, I'll proceed to chopping up pyblosxom > modules. To start with, I want to move logging-related functions into > its own module, as well as other, more minor, attendant changes: i.e., > deprecated_function() will need to relocated, or at least, I'd have to > figure out how not to invoke Python's wrath at yet another breach of > circular dependency conduct. > > Let me know what you guys think. |