[Zope3-dev] Re: SVN: Zope3/branches/jim-adapter/src/zope/ Redeprecated a number of things that didn't generate warnings

Philipp von Weitershausen philipp at weitershausen.de
Tue Mar 14 17:26:02 EST 2006


Jim Fulton wrote:
> I didn't see evidence of deprecation warnings.  These methods didn't
> generate warnings.  The code:
> 
>   from bbb import *
> 
> or
> 
>   from bbb import x, y, ...,
> 
> is, sadly, quite common and generates no warnings.

The import doesn't, but the use of each method did because they looked
like this:

def getView(object, name, request, providing=Interface, context=None):
    if __warn__:
        warnings.warn(
            "The concrete concept of a view has been deprecated. You "
            "want to "
            "use `getMultiAdapter((object, request), providing, name, "
            "context)`.",
            DeprecationWarning, warningLevel())
    ...

I know for a fact that each call to getView, getResource, etc. (in
short, every function that's now in back35.py) generated warnings upon
being called, and it's the message shown above in the code snippet.

> It's actually even worse though.  Many things that are deprecated also
> provide implementation that non-deprecated code relies on. :(

I don't think any code relies on the stuff in back35.py, except for
perhaps the get[Global]Service[s] stuff.

Philipp


More information about the Zope3-dev mailing list