Ugh. I still didn't nail it down. I think the reason I was so hung up
on mdproviders is because that was my "way in" - but it apparently has
almost nothing to do with the problem, so please pretend I didn't
mention it :)

A few things:

1) repoze.who used by TurboGears is 1.0 not 2.0
2) The dictionary is actually the interface registry where the
contents of mdproviders get stored later:
3) You keep addressing my mistakes but not my points.

3a) I cannot provide any metadata providers to setup_sql_auth() with
the default base TurboGears quickstart project, assuming it should
only be called once. If it's okay to call it twice, or there's some
way to inject my provider into the load environment, I'd love to know.
3b) As shown in the source I linked last message, the groups and
permissions environment variables do get overwritten, which I see as a
problem whether or not any of the rest of this is true.
3c) The providers are indeed stored in a dictionary, as linked in (2),
so ordering cannot be relied on. (If {} is *not* a blank dictionary,
then please tell me so I can facepalm!)

4) The change suggested is small and sensible, as far as I can
determine. The only thing that changes is that two assignment
statements become update statements instead of direct assignments. I
can understand a desire not to change things when it's unnecessary,
particularly at the request of a Python newbie, but I would appreciate
it if you could make the distinction for me between "I(?) don't intend
to implement it" and "I'm just trying to help a newbie" so that I
don't spend my time arguing a useless case...

I understand that TG is not your purview, however it is a useful tool
that exists, and this small change would make the difference between
"I can write this to work with the default setup with only a few lines
of code" and "I have to rewrite all this stuff that was provided for
me from the ground up without understanding it completely" - I
obviously chose the former, but I'd like to do it nicely instead of
messily. If you have a clean solution that can avoid making the change
I suggest, I'd love to hear it; on the other hand, if there's a reason
that it shouldn't be changed, I would like to know that too - because
currently that is what I have done. I was mailing the dev list to
hopefully get the change added to the package so I wouldn't have to
either modify the package or monkey patch it.

Repoze-dev mailing list

Reply via email to