Buildout -- Software for automating application assembly

use of "self" as global in _open (formerly a method?)

Reported by ke1g on 2008-12-10
2
Affects Status Importance Assigned to Milestone
Buildout
Undecided
Unassigned

Bug Description

The function _open() in buildout.py (line 1127 in zc buildout 1.1.1) attempts (at line 1174) to issue a deprecation warning, using:

    self._logger.warn("some text")

But this isn't a method, as self is not defined here.

This results in an unhelpful exception, rather than the deprecation warning if one attempts to use "extended-by".

Apparently not many people try extended-by, so this has gone unnoticed, and it thus low priority.

One fix would be to make _logger a global, rather than an instance variable of class Buildout. I can't say that I've studied the code hard enough to know that there isn't some reason that it's not.

My preferred fix is to un-deprecate extended-by. I'd like to use it. The code is there, small, and shouldn't be a support burden. If the primary justification for deprecation is documentation burden, then I'm happy if you leave it undocumented, or, if desired, I will make an effort at a paragraph or two, maybe some use cases, maybe contrasting it with extends.

I'd also be willing to submit a code patch for one of the two approaches above, if I'm told which approach would be accepted. (I'm not, however, interested in participating in the removal of the extended-by implementation.)

Bill

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers