[Zope-dev] Zope Tests: 5 OK

2008-07-18 Thread Zope Tests Summarizer
Summary of messages to the zope-tests list.
Period Thu Jul 17 11:00:00 2008 UTC to Fri Jul 18 11:00:00 2008 UTC.
There were 5 messages: 5 from Zope Tests.


Tests passed OK
---

Subject: OK : Zope-2.8 Python-2.3.6 : Linux
From: Zope Tests
Date: Thu Jul 17 21:01:24 EDT 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-July/009870.html

Subject: OK : Zope-2.9 Python-2.4.4 : Linux
From: Zope Tests
Date: Thu Jul 17 21:02:57 EDT 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-July/009871.html

Subject: OK : Zope-2.10 Python-2.4.4 : Linux
From: Zope Tests
Date: Thu Jul 17 21:04:27 EDT 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-July/009872.html

Subject: OK : Zope-2.11 Python-2.4.4 : Linux
From: Zope Tests
Date: Thu Jul 17 21:05:57 EDT 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-July/009873.html

Subject: OK : Zope-trunk Python-2.4.4 : Linux
From: Zope Tests
Date: Thu Jul 17 21:07:27 EDT 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-July/009874.html

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Please use 'svn mv'

2008-07-18 Thread Philipp von Weitershausen
I would like to remind everyone that when you do refactorings and move 
code around, to please use 'svn mv' or 'svn cp'. For instance, when you 
split a large file into two smaller ones, use 'svn cp' to create the 
second file and then remove stuff from it that doesn't go there. That 
way, version history isn't lost for neither parts of the code. The same 
goes for splitting up packages (moving components into a library 
package, for instance).


Thanks.

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: [Plone-developers] PAULA: bringing Zope 3's authentication to Plone and beyond

2008-07-18 Thread Hermann Himmelbauer
Am Freitag, 18. Juli 2008 03:55 schrieb Florian Friesdorf:
 On Wed, Jul 16, 2008 at 10:20:58AM +0200, Hermann Himmelbauer wrote:
  Am Mittwoch, 16. Juli 2008 05:48 schrieb Florian Friesdorf:
   InternalPrincipal is a persistent object used to store the data of
   principals in a PrincipalFolder, PrincipalInfo is returned upon
   successfull authentication and handed to FoundPrincipalFactory, which
   extracts some information and returns Principal objects.
 
  Ok, this is how I see it, too. But let me describe my understanding more
  specific:
 
  I see it that way that applications with authentication will normally
  have something like a user object, which stores all related
  authentication/user information. This user object may reside in a RDB, a
  text file, or, as here, in a PrincipalFolder (as an InternalPrincipal).

 I would put the object in quotation, too, as for example in RDB it isnt
 an object at all, but simply authentication data + properties and, yes,
 this corresponds to InternalPrincipal.

Yes, that's o.k. In my specific application, I use an ORM, thus table rows are 
mapped to objects - user objects.

  If I understand it right, a Principal is an entity that is the result of
  an authentication process and holds all needed information for
  authorization. However, it is not designed to store user specific
  information, e.g. login names, user names and the like.
 
  And PrincipalInfo is somehow a specific aggregation of user data, which
  can be used throughout the application. This object may have to be
  inherited to an extended MyPrincipalInfo object, as many applications may
  need extra info from this object.
 
  So, both the Principal and PrincipalInfo objects have to be created out
  of the user object, it is not possible to create a Principal out of a
  PrincipalInfo and reverse.

 I think you are wrong here:

Maybe I was, I mixed some things up, it seems.

 zope.app.authentication.authentication.PluggableAuthentication.authenticate
 is the place to look at.
 1. a PrincipalInfo object is got by calling authenticateCredentials from an
authplugin

Yes, true. For that reason, my AuthenticatorPlugin overwrites the 
authenticateCredentials method and retrieves the internal principal (=my user 
object), builds an appropriate PrincipalInfo object and returns that.

 2. this is handed to an AuthenticatedPrincipalFactory, which returns a
 Principal object

Right. so I was wrong above: The Principal object is built out of the 
PrincipalInfo object. However, that's exactly the problem: The only data I 
have to create the Principal, is the PrincipalInfo object. Thus I lose any 
extra user information.

So, in order to transport needed information from the user - Principal, I 
have two options:

1) Stuff out PrincipalInfo with all needed data that my Principal needs
2) In the AuthenticatedPrincipalFactory I would query for my internal user 
object (InternalPrincipal) and transfer all needed data to the Principal from 
there.

In my application, I chose (1) for performance reasons, although, I have to 
admit, is quite complicated, as I have to create a customer PrincipalInfo 
class etc., moreover, the IPrincipalInfo class states: 

class IPrincipalInfo(zope.interface.Interface):
Minimal information about a principal.

For variant (1) it has to hold a lot more information, so it contradicts the 
meaning of this class.

 So, PrincipalInfo is internal to PAU and as far as I figured does not leave
 it. Objects that leave PAU are those created by
 AuthenticatedPrincipalFactories, for authentication, and by
 FoundPrincipalFactories, for searches - In case of PrincipalFolder that is
 Principal objects in both cases.

Yes, that's true.

  - I need to administer the user, e.g. change password etc.: I'd use the
  user object (InternalPrincipal) for that.

 I would again use the principal object, which transparently performs the
 changes wherever they are necessary, i.e all properties of the user are
 available from the Principal object and changes to them will happen on
 their actual source.

Hmmm, interesting.

  - user object: There seems to be no zope3 support for that yet - so it
  seems I have to do this manually (some getUser(login) function, get the
  login from request.principal.id[lenAUTH_PREFIX):], not very pretty,
  though.).

 principal is the user object

Ok, it seems that the principal is really the representation of my user object 
and may hold anything I need.

 In case you store your userdata in RDB, you do not need InternalPrincipal
 at all. I currently see to options:

 1. custom AuthenticatorPlugin, AuthenticatedPrincipalFactory and
 FoundPrincipalFactory from principalfolder.py. Your AuthenticatorPlugin
 would need to return PrincipalInfo objects. Further, you write an event
 handler that listens for FoundPrincipalCreated and
 AuthenticatedPrincipalCreated, which puts all needed/wanted properties onto
 the Principal object, which was created by one of the factories. 
 Those 
 

[Zope-dev] could zope.sqlalchemy flush before committing?

2008-07-18 Thread Brandon Craig Rhodes
I complained recently about problems with things disappearing from an
in-memory sqlite database.  It appears that my problems were actually
symptoms of something else: that, so far as I can see, doing a

   transaction.commit()

when SQLAlchemy is active does *not* first do a session().commit()!
This means that the following sequence in a test suite:

p = Person(name='Brandon')
s = session()
s.add(p)
transaction.commit()

s.attribute = 'an illegal value'
   Traceback:
  ...
   Exception: the database does not allow that attribute to have that value
transaction.rollback()

Instead, to make this work, one has to write the first stanza as:

p = Person(name='Brandon')
s = session()
s.add(p)
s.flush()  # Sheesh
transaction.commit()

Could zope.sqlalchemy be improved so that, on transaction commit, the
current SQLAlchemy session is first flushed before being committed?

-- 
Brandon Craig Rhodes   [EMAIL PROTECTED]   http://rhodesmill.org/brandon
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: could zope.sqlalchemy flush before committing?

2008-07-18 Thread Brandon Craig Rhodes
Brandon Craig Rhodes [EMAIL PROTECTED] writes:

 I complained recently about problems with things disappearing from an
 in-memory sqlite database.  It appears that my problems were actually
 symptoms of something else: that, so far as I can see, doing a

transaction.commit()

 when SQLAlchemy is active does *not* first do a session().commit()!

Drat.  I meant, as I hope the code examples that followed made clear,
that doing a transaction.commit() does not do a session().flush().

-- 
Brandon Craig Rhodes   [EMAIL PROTECTED]   http://rhodesmill.org/brandon

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Zope 3 on Python 2.5, Zope 3 releases

2008-07-18 Thread Chris Withers

Martijn Faassen wrote:

Okay, so we can safely add Chris (and also Philipp) to the list of
people maintaining our windows binary eggs. Awesome! Chris, do you
think you can take it from here in getting an environment set up?


Would be rgeat to have a bullet point list for how to get a suitable 
environment set up given that I don't have mingw32 and have never used 
it before in my life :-S


Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Zope 3 on Python 2.5, Zope 3 releases

2008-07-18 Thread Hanno Schlichting

Chris Withers wrote:

Martijn Faassen wrote:

Okay, so we can safely add Chris (and also Philipp) to the list of
people maintaining our windows binary eggs. Awesome! Chris, do you
think you can take it from here in getting an environment set up?


Would be rgeat to have a bullet point list for how to get a suitable 
environment set up given that I don't have mingw32 and have never used 
it before in my life :-S


There are too tutorials out there:

http://www.z3lab.org/sections/blogs/philipp-weitershausen/2007_07_26_cheap-binary-windows

is the simple version.

http://plone.org/documentation/how-to/using-ploneout-on-windows

Is the more detailed one including screenshots...

Hanno

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Zope 3 on Python 2.5, Zope 3 releases

2008-07-18 Thread Sidnei da Silva
On Fri, Jul 18, 2008 at 1:23 PM, Chris Withers [EMAIL PROTECTED] wrote:
 Would be rgeat to have a bullet point list for how to get a suitable
 environment set up given that I don't have mingw32 and have never used it
 before in my life :-S

Like this?

http://plone.org/documentation/how-to/using-ploneout-on-windows

-- 
Sidnei da Silva
Enfold Systems http://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Zope 3 on Python 2.5, Zope 3 releases

2008-07-18 Thread Chris Withers

Sidnei da Silva wrote:

On Fri, Jul 18, 2008 at 1:23 PM, Chris Withers [EMAIL PROTECTED] wrote:

Would be rgeat to have a bullet point list for how to get a suitable
environment set up given that I don't have mingw32 and have never used it
before in my life :-S


Like this?

http://plone.org/documentation/how-to/using-ploneout-on-windows


But I'm alergic to things with plohn in the title 0.5 wink

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Zope 3 on Python 2.5, Zope 3 releases

2008-07-18 Thread Hanno Schlichting

Chris Withers wrote:

Sidnei da Silva wrote:
On Fri, Jul 18, 2008 at 1:23 PM, Chris Withers 
[EMAIL PROTECTED] wrote:

Would be rgeat to have a bullet point list for how to get a suitable
environment set up given that I don't have mingw32 and have never 
used it

before in my life :-S


Like this?

http://plone.org/documentation/how-to/using-ploneout-on-windows


But I'm alergic to things with plohn in the title 0.5 wink


That's why I posted you the link to the tutorial from Phillip as well, 
so even if you'd look into mine, you wouldn't have to admit it ;)


Hanno

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Zope 3 on Python 2.5, Zope 3 releases

2008-07-18 Thread Martin Aspeli

Chris Withers wrote:

Martijn Faassen wrote:

Okay, so we can safely add Chris (and also Philipp) to the list of
people maintaining our windows binary eggs. Awesome! Chris, do you
think you can take it from here in getting an environment set up?


Would be rgeat to have a bullet point list for how to get a suitable 
environment set up given that I don't have mingw32 and have never used 
it before in my life :-S


I've pointed you at the Windows section in 
http://plone.org/documentation/tutorial/buildout/prerequisites at least 
once now.


Maybe you'll manage to swallow your aversion to Plone and read it this 
time? It really isn't hard at all.


Martin

--
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )