pyramid and zope.component registry

73 views
Skip to first unread message

Arndt Droullier

unread,
Jan 16, 2012, 1:46:37 PM1/16/12
to pylons-...@googlegroups.com

Hi,
since zope.component has been removed from pyramid dependencies could
the pyramid registry be used in a similar way like
zope.component.registry.Components ?
Or are both altogether different?

I mean used for simple registration and querying based on interfaces.
Not a replacement for all zope.component supported features.

Thanks, Arndt.

Chris Rossi

unread,
Jan 16, 2012, 1:53:49 PM1/16/12
to pylons-...@googlegroups.com
On Mon, Jan 16, 2012 at 1:46 PM, Arndt Droullier <a...@dvelectric.com> wrote:

Hi,
since zope.component has been removed from pyramid dependencies could
the pyramid registry be used in a similar way like
zope.component.registry.Components ?

Yes. 
 
Or are both altogether different?


The pyramid registry extends the zope registry.  So all of the methods you're used to using on the zope registry are available on the pyramid registry.

Chris

Michael Merickel

unread,
Jan 16, 2012, 1:53:14 PM1/16/12
to pylons-...@googlegroups.com
The registry supports adapters, utilities and subscribers. Most of that code was moved into zope.interface.registry, if you look at the pypi changelog for zope.interface version 3.8.0.


--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To post to this group, send email to pylons-...@googlegroups.com.
To unsubscribe from this group, send email to pylons-discus...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.


Chris McDonough

unread,
Jan 16, 2012, 1:58:52 PM1/16/12
to pylons-...@googlegroups.com

Yes, you should be much more pleased with this lightweight version.

- C

PS: we just moved the Components code from zope.component.registry to
zope.interface.registry. So it's the same code, just with a different
name. So it's exactly the same thing, except much cooler, because it
has a new name. ;-)

Chris Withers

unread,
Jan 16, 2012, 4:29:47 PM1/16/12
to pylons-...@googlegroups.com, Chris McDonough
On 16/01/2012 18:58, Chris McDonough wrote:
> PS: we just moved the Components code from zope.component.registry to
> zope.interface.registry. So it's the same code, just with a different
> name. So it's exactly the same thing, except much cooler, because it
> has a new name. ;-)

For dinosaurs like myself, is there a migration guide anywhere?

(ie: I'm using to calling getSiteManager().registerUtility(), etc, what
do I do now? Can I still use zope.component's getSiteManager() or will
things "just not work" (tm))

cheers,

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk

Chris McDonough

unread,
Jan 16, 2012, 4:41:40 PM1/16/12
to pylons-...@googlegroups.com
On Mon, 2012-01-16 at 21:29 +0000, Chris Withers wrote:
> On 16/01/2012 18:58, Chris McDonough wrote:
> > PS: we just moved the Components code from zope.component.registry to
> > zope.interface.registry. So it's the same code, just with a different
> > name. So it's exactly the same thing, except much cooler, because it
> > has a new name. ;-)
>
> For dinosaurs like myself, is there a migration guide anywhere?
>
> (ie: I'm using to calling getSiteManager().registerUtility(), etc, what
> do I do now? Can I still use zope.component's getSiteManager() or will
> things "just not work" (tm))

Nothing has changed, we just moved code around; backwards compatibility
shims are in place or importing forever.

- C


Reply all
Reply to author
Forward
0 new messages