Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: CMF

IMember: does it exist?

 

 

Zope cmf RSS feed   Index | Next | Previous | View Threaded


slinkp at gmail

Oct 2, 2008, 11:32 AM

Post #1 of 8 (1079 views)
Permalink
IMember: does it exist?

In CMFCore/interfaces/_tools.py I found several references
to an IMember interface:

class IMemberDataTool(Interface):
...
def wrapUser(user):
"""Returns an IMember corresponding to the given user object.
...
"""

...

class IMembershipTool(Interface):
...
def getMemberById(id):
""" Returns the given IMember.
...
"""

...
def listMembers():
""" Return a sequence of all IMembers.
...
"""
...

But there does not seem to be any such interface as IMember.
I've grepped everywhere I can think of.

There probably should be :)

- PW

_______________________________________________
Zope-CMF maillist - Zope-CMF[at]lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests


jens at dataflake

Oct 2, 2008, 12:01 PM

Post #2 of 8 (1042 views)
Permalink
Re: IMember: does it exist? [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Oct 2, 2008, at 20:32 , Paul Winkler wrote:

> But there does not seem to be any such interface as IMember.
> I've grepped everywhere I can think of.
>
> There probably should be :)

I'd say that's a typo. The referenced IMember probably means the
IMemberData interface, which does exist.

If no one complains I'll change it over the next few days.

jens



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)

iEYEARECAAYFAkjlGnoACgkQRAx5nvEhZLIP2QCdHGTywTw3JResbScmc+yHu+3x
2ycAn3u2I09zBcH7v9nGom0KvscI1LI3
=dwXE
-----END PGP SIGNATURE-----
_______________________________________________
Zope-CMF maillist - Zope-CMF[at]lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests


slinkp at gmail

Oct 3, 2008, 9:39 AM

Post #3 of 8 (1035 views)
Permalink
Re: IMember: does it exist? [In reply to]

Jens Vagelpohl <jens[at]...> writes:
> I'd say that's a typo. The referenced IMember probably means the
> IMemberData interface, which does exist.

Sounds good. Existing member implementations might have to be updated to declare
themselves implementing that interface. For example, remember does not, although
it does provide the required setProperties method.


_______________________________________________
Zope-CMF maillist - Zope-CMF[at]lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests


ra at burningman

Oct 3, 2008, 12:14 PM

Post #4 of 8 (1035 views)
Permalink
Re: IMember: does it exist? [In reply to]

Paul Winkler wrote:
> Jens Vagelpohl <jens[at]...> writes:
>> I'd say that's a typo. The referenced IMember probably means the
>> IMemberData interface, which does exist.
>
> Sounds good. Existing member implementations might have to be updated to declare
> themselves implementing that interface. For example, remember does not, although
> it does provide the required setProperties method.

this is off-topic for this list, so we can discuss this off-list if you want
to go any deeper, paul, but strictly speaking i don't think remember's Member
class needs to implement IMemberData. the Member class is content, and PAS
plug-ins use that content to generate and provide properties for user objects.
then CMF does it's normal wrapping of these user objects using the standard
MemberData implementation.

-r

_______________________________________________
Zope-CMF maillist - Zope-CMF[at]lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests


slinkp at gmail

Oct 7, 2008, 4:32 PM

Post #5 of 8 (1019 views)
Permalink
Re: IMember: does it exist? [In reply to]

Rob Miller <ra[at]...> writes:
> then CMF does it's normal wrapping of these user objects using the standard
> MemberData implementation.

Hmm, right, so then this might still be on-topic here ;-)
Maybe the right thing is for CMF to do a directlyProvides() call in wrapUser?

- PW




_______________________________________________
Zope-CMF maillist - Zope-CMF[at]lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests


jens at dataflake

Oct 8, 2008, 12:29 AM

Post #6 of 8 (1018 views)
Permalink
Re: IMember: does it exist? [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Oct 8, 2008, at 01:32 , Paul Winkler wrote:

> Rob Miller <ra[at]...> writes:
>> then CMF does it's normal wrapping of these user objects using the
>> standard
>> MemberData implementation.
>
> Hmm, right, so then this might still be on-topic here ;-)
> Maybe the right thing is for CMF to do a directlyProvides() call in
> wrapUser?

The CMF itself doesn't need this. There's no place that tries to
ensure a member does indeed provide IMemberData or similar. If this is
something you need for Plone I'm happy to consider patches with tests.

jens



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)

iEYEARECAAYFAkjsYVsACgkQRAx5nvEhZLKp+wCeNXxY6pPNfOSf9TEHnt71bPOJ
2A8AoKp6Y73R2YLRPJ699edbJWRPzplv
=bVJl
-----END PGP SIGNATURE-----
_______________________________________________
Zope-CMF maillist - Zope-CMF[at]lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests


philipp at weitershausen

Oct 8, 2008, 4:07 AM

Post #7 of 8 (1010 views)
Permalink
Re: IMember: does it exist? [In reply to]

Paul Winkler wrote:
> Rob Miller <ra[at]...> writes:
>> then CMF does it's normal wrapping of these user objects using the standard
>> MemberData implementation.
>
> Hmm, right, so then this might still be on-topic here ;-)
> Maybe the right thing is for CMF to do a directlyProvides() call in wrapUser?

Please consider using alsoProvides() since directlyProvides *overrides*
all directly set interfaces. alsoProvides *adds* to them.

_______________________________________________
Zope-CMF maillist - Zope-CMF[at]lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests


slinkp at gmail

Oct 8, 2008, 3:02 PM

Post #8 of 8 (1008 views)
Permalink
Re: IMember: does it exist? [In reply to]

Jens Vagelpohl <jens[at]...> writes:

>
>
> On Oct 8, 2008, at 01:32 , Paul Winkler wrote:
>
> > Rob Miller <ra[at]...> writes:
> >> then CMF does it's normal wrapping of these user objects using the
> >> standard
> >> MemberData implementation.
> >
> > Hmm, right, so then this might still be on-topic here
> > Maybe the right thing is for CMF to do a directlyProvides() call in
> > wrapUser?
>
> The CMF itself doesn't need this. There's no place that tries to
> ensure a member does indeed provide IMemberData or similar.

In that case I'd be inclined to leave CMF alone, until somebody actually depends
on that behavior.

> If this is
> something you need for Plone I'm happy to consider patches with tests.

Not me; I was initially just trying to understand how the interfaces relate to
each other. To me it's just a documentation issue.

(Oh, and Philip, thanks for the reminder about alsoProvides(); I've made that
mistake before and should have learned from it by now!)

- PW

_______________________________________________
Zope-CMF maillist - Zope-CMF[at]lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests

Zope cmf RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.