[Zope3-checkins] SVN: Zope3/branches/jim-adapter/src/zope/component/globalregistry.py Fixed the backward-compatible subscription registration.

Stephan Richter srichter at cosmos.phy.tufts.edu
Wed Mar 1 07:59:15 EST 2006


On Tuesday 28 February 2006 18:47, Jim Fulton wrote:
> Log message for revision 65626:
>   Fixed the backward-compatible subscription registration.
...
> Modified: Zope3/branches/jim-adapter/src/zope/component/globalregistry.py
> ===================================================================
> ---
> Zope3/branches/jim-adapter/src/zope/component/globalregistry.py     2006-02
>-28 23:45:59 UTC (rev 65625) +++
> Zope3/branches/jim-adapter/src/zope/component/globalregistry.py     2006-02
>-28 23:47:29 UTC (rev 65626) @@ -117,7 +117,11 @@
>      def subscribe(self, required, provided, factory, info=''):
>          # we're discarding 'provided' here, but a subscriber doesn't
>          # need that anyway
> -        self.registerHandler(factory, required, u'', info)
> +        if provided is None:
> +            self.registerHandler(factory, required, u'', info)
> +        else:
> +            self.registerSubscriptionAdapter(factory, required, provided,
> +                                             info=info)

Doesn't this mean that we need a deprecation warning here somewhere?

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training


More information about the Zope3-Checkins mailing list