Re: zope.app.wsgi.paste doesn't emit a ProcessStarting event

Marius Gedminas <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Message-ID <20120118235040.GA3433@platonas>
On Wed, Jan 18, 2012 at 05:00:27PM -0500, Jim Fulton wrote:
> zope.app.server emits a ProcessStarting event on startup.
> 
> zope.app.wsgi.paste doesn't.  I think it should.

+1

> If there are no
> objections, I'll make a bug fix release for this.

Hm.  I've an app that wraps zope.app.wsgi like this:

    from zope.app.wsgi import getWSGIApplication
    from zope.app.appsetup.interfaces import ProcessStarting
    from zope.event import notify

    def app_factory(global_config, **local_conf):
        """Create a Zope WSGI application given a zope configuration.

        The configuration needs to be specified as the 'config' parameter, e.g. in
        paster.ini use::

            [app:main]
            use = egg:ivija
            config =
                site-definition %(site-definition)s
                <zodb>
                  <zeoclient>
                    server %(run-directory)s/zeosock
                  </zeoclient>
                </zodb>
                <eventlog>
                  <logfile>
                    formatter zope.exceptions.log.Formatter
                    path %(log-directory)s/z3.log
                  </logfile>
                  <logfile>
                    formatter zope.exceptions.log.Formatter
                    path STDOUT
                  </logfile>
                </eventlog>

        """
        app = getWSGIApplication(StringIO(local_conf['config']))
        notify(ProcessStarting())
        return app

Would this result in duplicate ProcessStarting() events after your proposed
change?  Can duplicate ProcessStarting() events cause harm?  If so, I'd rather
see a bigger version bump than just a bugfix.

(We are pinning all our dependency versions with buildout-versions, so our app
won't break if you rele--oh, I see you already released 3.9.3zc2 with the
change.)

> BTW, I ended up making a 3.9.3zc1 release (this will spur 3.9.3zc2
> release) because the latest release breaks our apps' tests.  Not sure
> if this was due to zope.testbrowser 4, or the (until recently)
> unreleased zope.app.testing changes needed to work with
> zope.testbrowser 4.  I haven't had time to chase these down, thus the
> 3.9.3zc1 release, which I'm not terribly proud of.

I'm confused about this.  "Latest release" refers to what, 3.9.3?  or was there
a newer version that is now hidden on PyPI?

Marius Gedminas
-- 
http://pov.lt/ -- Zope 3/BlueBream consulting and development

_______________________________________________
Zope-Dev maillist  -  [email protected]
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 )
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk8XWtAACgkQkVdEXeem14/oAwCdHQwB0ZWu5e6PMd5coLDkmOiS
t5AAoI033SRgUseGnShy7syIJZdcZDyO
=Rm0H
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.