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

Bug #306901 reported by ke1g
2
Affects Status Importance Assigned to Milestone
Buildout
New
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.