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

Jim Fulton jim at zope.com
Wed Mar 15 07:20:35 EST 2006


Philipp von Weitershausen wrote:
> Stephan Richter wrote:
> 
>>On Tuesday 14 March 2006 17:26, Philipp von Weitershausen wrote:
>>
>>>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.
>>
>>This would also be the reason you would see many less deprecation warnings.
>>Because here they would be only report the warning once for all getView
>>calls, while the import approach reports every call.
> 
> 
> It's the other way around, but essentially yes.
> 
> Fact is, the stuff in back35.py was definitely officially deprecated since Zope
> 3.1. I *think* we can get rid of it.

You are right.  They are now gone.

Jim

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org


More information about the Zope3-dev mailing list