[Zope-dev] zope.sendmail dependencies

2009-06-25 Thread Fabio Tranchitella
Hello,

it looks like zope.sendmail should depend on transaction (because that's
what it is using, importing it) and not on the full ZODB3.

Am I missing something?

Thanks,
Fabio
___
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] new zope.18nmessageid release

2009-06-25 Thread Chris McDonough
Would anyone mind if I made a new release of zope.18nmessageid?  It would 
probably be version 3.5.0.  The last release was in 2007, and the trunk code 
has 
"optional" C extension compilation (falling back to the Python "Message" 
implementation if the C extensions cannot be compiled).  Other changes on the 
trunk seem to be rather uncontroversial:

3.5.0 (unreleased)
--

- Made compilation of C extension optional.

- Added support to bootstrap on Jython.

- Changed package's mailing list address from zope3-dev at zope.org to
   zope-dev at zope.org, because zope3-dev is now retired.

- Reformatted change log to common formatting style.

- Update package description and docs a little.

- Remove old .cfg files for zpkg.
___
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] Zope Tests: 8 OK

2009-06-25 Thread Zope Tests Summarizer
Summary of messages to the zope-tests list.
Period Wed Jun 24 12:00:00 2009 UTC to Thu Jun 25 12:00:00 2009 UTC.
There were 8 messages: 8 from Zope Tests.


Tests passed OK
---

Subject: OK : Zope-2.10 Python-2.4.6 : Linux
From: Zope Tests
Date: Wed Jun 24 21:11:44 EDT 2009
URL: http://mail.zope.org/pipermail/zope-tests/2009-June/012019.html

Subject: OK : Zope-2.11 Python-2.4.6 : Linux
From: Zope Tests
Date: Wed Jun 24 21:13:49 EDT 2009
URL: http://mail.zope.org/pipermail/zope-tests/2009-June/012020.html

Subject: OK : Zope-trunk Python-2.4.6 : Linux
From: Zope Tests
Date: Wed Jun 24 21:15:49 EDT 2009
URL: http://mail.zope.org/pipermail/zope-tests/2009-June/012021.html

Subject: OK : Zope-trunk Python-2.5.4 : Linux
From: Zope Tests
Date: Wed Jun 24 21:17:50 EDT 2009
URL: http://mail.zope.org/pipermail/zope-tests/2009-June/012022.html

Subject: OK : Zope-trunk Python-2.6.1 : Linux
From: Zope Tests
Date: Wed Jun 24 21:19:57 EDT 2009
URL: http://mail.zope.org/pipermail/zope-tests/2009-June/012023.html

Subject: OK : Zope-trunk-alltests Python-2.4.6 : Linux
From: Zope Tests
Date: Wed Jun 24 21:21:57 EDT 2009
URL: http://mail.zope.org/pipermail/zope-tests/2009-June/012024.html

Subject: OK : Zope-trunk-alltests Python-2.5.4 : Linux
From: Zope Tests
Date: Wed Jun 24 21:23:57 EDT 2009
URL: http://mail.zope.org/pipermail/zope-tests/2009-June/012025.html

Subject: OK : Zope-trunk-alltests Python-2.6.1 : Linux
From: Zope Tests
Date: Wed Jun 24 21:25:57 EDT 2009
URL: http://mail.zope.org/pipermail/zope-tests/2009-June/012026.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 )


Re: [Zope-dev] zc.async: cron replacement?

2009-06-25 Thread Hermann Himmelbauer
Am Mittwoch 24 Juni 2009 19:19:17 schrieb Reinout van Rees:
> Hi all,
>
> In messages like
> http://www.mail-archive.com/zope3-...@zope.org/msg05964.html, zc.async is
> mentioned as the solution for cron-like functionality in zope. Effectively
> you would not need zope2's clockserver.
>
> Reading zc.async's docs, I cannot find how to do a given task regularly. 
> For example a weekly pack.  Or a daily call of one method that archives
> older items.  That sort of stuff. Many things can be handled by cronjobs,
> but you tend to get a lot of them.  And you don't want to embed the
> password everywhere.
>
> Anyway: I cannot find the word "cron" anywhere in the zc.async source.  Or
> "repetitive" or "regular".  Is zc.async not intended for this kind of
> usage?

I personally recommend to also look at lovely.remotetask, as this does have 
direct cronjob functionality and is relatively simple to implement. 
I personally use it, however, I'm still a bit sceptic if it's really robust 
and scales well, moreover, I'm unsure if it is actively maintained.

Best Regards,
Hermann

-- 
herm...@qwer.tk
GPG key ID: 299893C7 (on keyservers)
FP: 0124 2584 8809 EF2A DBF9  4902 64B4 D16B 2998 93C7
___
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] zc.async: cron replacement?

2009-06-25 Thread Reinout van Rees
On 2009-06-24, Gary Poster  wrote:
>
> zc.async can be used to do cron-like activities by starting a job,
> to be performed after a certain time, that has a callback that
> reschedules another job when desired.
>
> This has the advantage over cron-like behavior because it does not
> reschedule until the first job is done.

Well, for a task that runs a couple of seconds once a day or once a
week...  My first thought was "if something goes wrong, the chain is
broken and no new jobs will be scheduled anymore".  From the
documentation, it seems zc.async is pretty robust so this is probably
not something I have to worry about.

I'd put a short paragraph in the readme that this is how you can do
cron jobs.  Helps with the google for "zope cron", too :-)

> Other zc.async competitors have cron implemented more directly, but
> I found it to be very easy and flexible to do what I wanted using
> the zc.async approach.

Thanks for the info.  I'll see if I can get a basic cron-with-pack
setup in one instance running.


Reinout

-- 
Reinout van Rees - rein...@vanrees.org - http://reinout.vanrees.org
Software developer at http://www.thehealthagency.com
"Military engineers build missiles. Civil engineers build targets"

___
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] z3c.saconfig engine creation configuration

2009-06-25 Thread Malthe Borch

Laurence Rowe wrote:
I would rather we did not hardcode the defaults from SQLAlchemy into the 
engine directive (I guess they could change in future). Instead use a 
default of None and only supply the parameter if the config option is set.


Sounds right to me. Attached is an update patch.

\malthe
Index: src/z3c/saconfig/zcml.py
===
--- src/z3c/saconfig/zcml.py(revision 101264)
+++ src/z3c/saconfig/zcml.py(working copy)
@@ -27,13 +27,28 @@
 required=False,
 default=False)
 
+pool_size = zope.schema.Int(
+title=u"Pool size",
+description=u"Number of connections to keep open inside the connection 
pool.",
+required=False)
+
+pool_recycle = zope.schema.Int(
+title=u"Pool recycle",
+description=u"Recycle connections after the given number of seconds 
have passed.",
+required=False)
+
+pool_timeout = zope.schema.Int(
+title=u"Pool timeout",
+description=u"Number of seconds to wait before giving up on getting a 
connection from the pool.",
+required=False)
+
 setup = zope.schema.BytesLine(
 title=u'After engine creation hook',
 description=u'Callback for creating mappers etc. One argument is 
passed, the engine',
 required=False,
 default=None)
+
 
-
 class ISessionDirective(zope.interface.Interface):
 """Registers a database scoped session"""
 
@@ -62,16 +77,27 @@
 default="z3c.saconfig.utility.GloballyScopedSession")
 
 
-def engine(_context, url, name=u"", echo=False, setup=None, twophase=False):
-factory = utility.EngineFactory(url, echo=echo)
-
+def engine(_context, url, name=u"", echo=False, setup=None, twophase=False,
+   pool_size=None, pool_recycle=None, pool_timeout=None):
+# to avoid overriding defaults, we only provide pool configuration
+# parameters if set
+kwargs = {}
+if pool_size is not None:
+kwargs['pool_size'] = pool_size
+if pool_recycle is not None:
+kwargs['pool_recycle'] = pool_recycle
+if pool_timeout is not None:
+kwargs['pool_timeout'] = pool_timeout
+
+factory = utility.EngineFactory(url, echo=echo, **kwargs)
+
 zope.component.zcml.utility(
 _context,
 provides=interfaces.IEngineFactory,
 component=factory,
 permission=zope.component.zcml.PublicPermission,
 name=name)
-
+
 if setup:
 if _context.package is None:
 callback = resolve(setup)
___
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 )