Re: [Zope-dev] zope.18n:translate() keyword arguments versus MessageID attributes

2010-10-27 Thread Christian Theune
On 10/27/2010 08:44 AM, Michael Howitz wrote:
 Am 26.10.2010 um 16:13 schrieb Tres Seaver:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 10/26/2010 09:36 AM, Christian Theune wrote:
 Hi,

 I've fiddled a bit with
 https://bugs.edge.launchpad.net/zope.i18n/+bug/592753 and ended up with
 an unclear situation:

 The ``translate'' methods of both zope.i18n and ITranslationDomain have
 optional parameters for the domain/default/mapping attributes of a
 message ID.

 The message ID attributes always override the parameters but it is not
 said why. (I probed the tests and they at least verify that this is the
 case but don't state motivation.)

 As I had to chase this down for quite a while when I originally tried to
 call zope.i18n.translate() directly (for providing translated emails) it
 took me quite a while to understand what's going on.

 I see two possibilities for improving the situation:

 - don't implicitly ignore the parameters, but raise an exception if
both a message id and at least one of the parameters (domain/default
/mapping) is given and write some documentation that explains the
situation (what is happening and why)

 or

 - make the parameters take precedence over the message id attributes

 So - why not do the latter?

 I prefer the latter, and don't think we need a deprecation cycle for it:
 if the call site is passing in a mapping, that is presumably more
 specific than anything stored in the catalog.  I can't see how we would
 break anything here, as nobody is likely to have actually used the
 feature (since it is effectively a no-op).

 +1 But the `mapping` attribute should update the existing mapping of the 
 message ID as this would allow to have a partial mapping stored on the 
 message ID and add the other part when translating.

Does this use case really appear that often?

I see that there isn't much danger to doing that as the mappings 
shouldn't be too large anyway and the code that processes them doesn't 
allow for control structures based on their values so having superfluous 
values wouldn't hurt and this behaviour would keep old code working.

OTOH can you make a feature request for this so I can deal with it 
separately?

Christian

-- 
Christian Theune · c...@gocept.com
gocept gmbh  co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1
Zope and Plone consulting and development
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Bug day and developer meeting today at 15:00 UTC

2010-10-27 Thread Christian Theune
Hi,

On 10/26/2010 09:14 AM, Christian Theune wrote:
 Hi,

 Today is a bug day and the weekly developer meeting.

 I haven't managed to write up the log from last week, but basically Jim,
 me, and some others talked about about the need for being able to
 communicate/document architecture/design decisions well - we didn't find
 the grand solution, though. ;)

 Today, we'll meet, as always, in #z...@freenode at 15:00 UTC.

This week my job of summarizing is suprisingly easy: nothing to 
summarize as I was the only attendee of the meeting.

So, just in case: if you're not happy with the topics I propose, please 
feel free to suggest others or just walk in. I'm happy to provide the 
regular space (and time) and am open to any issues regarding zope-dev.

Christian

-- 
Christian Theune · c...@gocept.com
gocept gmbh  co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1
Zope and Plone consulting and development
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Zope Tests: 80 OK, 13 Failed

2010-10-27 Thread Zope Tests Summarizer
Summary of messages to the zope-tests list.
Period Tue Oct 26 12:00:00 2010 UTC to Wed Oct 27 12:00:00 2010 UTC.
There were 93 messages: 6 from Zope Tests, 4 from buildbot at pov.lt, 19 from 
buildbot at winbot.zope.org, 11 from ccomb at free.fr, 53 from jdriessen at 
thehealthagency.com.


Test failures
-

Subject: FAILED : Zope Buildbot / zope2.13-py2.7 slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Tue Oct 26 11:22:55 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022341.html

Subject: FAILED : Zope Buildbot / zope2.14-py2.7 slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Tue Oct 26 11:26:34 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022344.html

Subject: FAILED : Zope Buildbot / zope2.13-py2.7 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Tue Oct 26 11:29:27 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022346.html

Subject: FAILED : Zope Buildbot / zope2.14-py2.7 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Tue Oct 26 11:32:46 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022348.html

Subject: FAILED : Zope Buildbot / zope2.13-py2.7 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Tue Oct 26 14:42:34 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022352.html

Subject: FAILED : Zope Buildbot / zope2.14-py2.7 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Tue Oct 26 14:46:01 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022354.html

Subject: FAILED : Zope Buildbot / zope2.13-py2.7 slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Tue Oct 26 15:11:25 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022362.html

Subject: FAILED : Zope Buildbot / zopetoolkit-py2.7 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Tue Oct 26 15:14:31 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022364.html

Subject: FAILED : Zope Buildbot / zope2.14-py2.7 slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Tue Oct 26 15:14:51 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022365.html

Subject: FAILED : Zope Buildbot / zopetoolkit-py2.7 slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Tue Oct 26 15:46:45 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022378.html

Subject: FAILED : winbot / ZODB_dev py_254_win32
From: buildbot at winbot.zope.org
Date: Tue Oct 26 19:21:31 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022397.html

Subject: FAILED : Zope Buildbot / zopetoolkit-py2.7 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Wed Oct 27 04:49:22 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022426.html

Subject: FAILED : Zope Buildbot / zopetoolkit-py2.7 slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Wed Oct 27 04:49:43 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022427.html


Tests passed OK
---

Subject: OK : Zope Buildbot / zope2.12-py2.6 slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Tue Oct 26 11:19:13 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022339.html

Subject: OK : Zope Buildbot / zope2.13-py2.6 slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Tue Oct 26 11:21:07 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022340.html

Subject: OK : Zope Buildbot / zope2.14-py2.6 slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Tue Oct 26 11:24:42 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022342.html

Subject: OK : Zope Buildbot / zope2.12-py2.6 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Tue Oct 26 11:26:02 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022343.html

Subject: OK : Zope Buildbot / zope2.13-py2.6 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Tue Oct 26 11:27:45 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022345.html

Subject: OK : Zope Buildbot / zope2.14-py2.6 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Tue Oct 26 11:31:08 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022347.html

Subject: OK : Zope Buildbot / zopetoolkit-1.0-py2.4 slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Tue Oct 26 11:33:03 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022349.html

Subject: OK : Zope Buildbot / zope2.12-py2.6 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Tue Oct 26 14:39:06 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022350.html

Subject: OK : Zope Buildbot / zope2.13-py2.6 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Tue Oct 26 14:40:53 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022351.html

Subject: OK : Zope Buildbot / 

[Zope-dev] Fwd: [Checkins] SVN: zope.component/branches/adamg-fix-getSiteManager/ - Fix _api.getSiteManager in the way that it returns now

2010-10-27 Thread Adam GROSZER
Hello,

Anyone against this change?

This change is needed because z3c.baseregistry does not work
otherwise. It registers everything in the global registry.
This is a blocker for us to move to ZTK 1.0.

Raise your hands until 28th October midnight UTC.
If noone objects until then, I'll merge to trunk and make a new
release.


This is a forwarded message
From: Adam Groszer agros...@gmail.com
To: check...@zope.org
Date: Wednesday, October 27, 2010, 2:25:11 PM
Subject: [Checkins] SVN: zope.component/branches/adamg-fix-getSiteManager/ - 
Fix _api.getSiteManager in the way that it returns now

===8==Original message text===
Log message for revision 117961:
  - Fix _api.getSiteManager in the way that it returns now
globalregistry.getGlobalSiteManager() if context is None. What's anyway
expected according to the docs.

Changed:
  U   zope.component/branches/adamg-fix-getSiteManager/CHANGES.txt
  U   
zope.component/branches/adamg-fix-getSiteManager/src/zope/component/_api.py

-=-
Modified: zope.component/branches/adamg-fix-getSiteManager/CHANGES.txt
===
--- zope.component/branches/adamg-fix-getSiteManager/CHANGES.txt
2010-10-27 12:11:58 UTC (rev 117960)
+++ zope.component/branches/adamg-fix-getSiteManager/CHANGES.txt
2010-10-27 12:25:10 UTC (rev 117961)
@@ -4,7 +4,12 @@
 3.10.1 (unreleased)
 ===
 
-- Nothing changed yet.
+- Fix _api.getSiteManager in the way that it returns now
+  globalregistry.getGlobalSiteManager() if context is None. What's anyway
+  expected according to the docs.
+  Before it returned a cached local variable (which was init'ed with
+  globalregistry.base). This made z3c.baseregisty burp, because z3c.baseregisty
+  modifies globalregistry.globalSiteManager. Insane.
 
 
 3.10.0 (2010-09-25)

Modified: 
zope.component/branches/adamg-fix-getSiteManager/src/zope/component/_api.py
===
--- zope.component/branches/adamg-fix-getSiteManager/src/zope/component/_api.py 
2010-10-27 12:11:58 UTC (rev 117960)
+++ zope.component/branches/adamg-fix-getSiteManager/src/zope/component/_api.py 
2010-10-27 12:25:10 UTC (rev 117961)
@@ -39,14 +39,16 @@
 # getSiteManager() returns a component registry.  Although the term
 # site manager is deprecated in favor of component registry,
 # the old term is kept around to maintain a stable API.
-base = None
 @hookable
 def getSiteManager(context=None):
-global base
 if context is None:
-if base is None:
-from zope.component.globalregistry import base
-return base
+# avoid cyclic import
+# adhere to the doc and return the globalSiteManager,
+# not some wannabe variable
+# do not cache the value either, because at least z3c.baseregistry
+# modifies it
+from zope.component.globalregistry import getGlobalSiteManager
+return getGlobalSiteManager()
 else:
 # Use the global site manager to adapt context to `IComponentLookup`
 # to avoid the recursion implied by using a local `getAdapter()` call.

___
checkins mailing list
check...@zope.org
https://mail.zope.org/mailman/listinfo/checkins

===8===End of original message text===

-- 
Best regards,
 Adam GROSZERmailto:agros...@gmail.com

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


Re: [Zope-dev] Fwd: [Checkins] SVN: zope.component/branches/adamg-fix-getSiteManager/ - Fix _api.getSiteManager in the way that it returns now

2010-10-27 Thread Stephan Richter
On Wednesday, October 27, 2010, Adam GROSZER wrote:
 This change is needed because z3c.baseregistry does not work
 otherwise. It registers everything in the global registry.
 This is a blocker for us to move to ZTK 1.0.
 
 Raise your hands until 28th October midnight UTC.
 If noone objects until then, I'll merge to trunk and make a new
 release.

I am going to need z3c.baseregistry in the next few days as well and we are on 
Bluebream 1.0b5, so I am all for getting this in ASAP. :-)

Regards,
Stephan
-- 
Entrepreneur and Software Geek
Google me. Zope Stephan Richter
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )