Re: [Zope-dev] zope.app.wsgi.paste doesn't emit a ProcessStarting event

2012-01-19 Thread Jim Fulton
On Thu, Jan 19, 2012 at 8:56 AM, Marius Gedminas  wrote:
> On Thu, Jan 19, 2012 at 06:30:35AM -0500, Jim Fulton wrote:
..
>> I'll also release this change as zope.app.wsgi 3.15.0, or do you think
>> this should be 4.0.0?
>
> 3.15.0 sounds about right to me.

Done.

Jim

--
Jim Fulton
http://www.linkedin.com/in/jimfulton
___
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] zope.app.wsgi.paste doesn't emit a ProcessStarting event

2012-01-19 Thread Marius Gedminas
On Thu, Jan 19, 2012 at 06:30:35AM -0500, Jim Fulton wrote:
> On Wed, Jan 18, 2012 at 6:50 PM, Marius Gedminas  wrote:
> > (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.)
> 
> Yup, yup.

...
> Your argument about the duplicate events is a reasonable one. I
> considered it, but thought that either people weren't using
> zope.app.wsgi.paste or didn't care about the event, given how long the
> problem has existed.  I could reverese the change with a 3.9.3zc3
> release.

There's no need to do that on my behalf.

I doubt anyone will accidentally upgrade to 3.9.3zc2 given that 3.14.0 is
currently the latest on PyPI.

> That would force me into trying to figure out the breakages
> introduced by "later" releases, or fork or monkey patch
> zope.app.wsgi. I'd rather not. :)  Given that an unpinned fetch of
> zope.app.wsgi won't get 3.9.3zc2 I'm thinking that my small foul is
> unlikely to do harm.

And the irregularity of the 'zc' version number is sufficient to pique
the curiosity of people and have them look in the changelog, I think.

> I'll also release this change as zope.app.wsgi 3.15.0, or do you think
> this should be 4.0.0?

3.15.0 sounds about right to me.

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


signature.asc
Description: Digital signature
___
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] zope.app.wsgi.paste doesn't emit a ProcessStarting event

2012-01-19 Thread Jim Fulton
On Wed, Jan 18, 2012 at 6:50 PM, Marius Gedminas  wrote:
> 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.
...
>"""
>app = getWSGIApplication(StringIO(local_conf['config']))
>notify(ProcessStarting())
>return app
>
> Would this result in duplicate ProcessStarting() events after your proposed
> change?

Yes.

> Can duplicate ProcessStarting() events cause harm?

I don't know. Theoretically.

> If so, I'd rather
> see a bigger version bump than just a bugfix.

Ideally, but ...

> (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.)

Yup, yup.

>
>> 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?

Sorry, my bad. I forgot to unhide 3.14.0 (and hide 3.9.3zc2).  Michael
Howitz fixed that. Thanks Michael.

Your argument about the duplicate events is a reasonable one. I
considered it, but thought that either people weren't using
zope.app.wsgi.paste or didn't care about the event, given how long the
problem has existed.  I could reverese the change with a 3.9.3zc3
release. That would force me into trying to figure out the breakages
introduced by "later" releases, or fork or monkey patch
zope.app.wsgi. I'd rather not. :)  Given that an unpinned fetch of
zope.app.wsgi won't get 3.9.3zc2 I'm thinking that my small foul is
unlikely to do harm.

I'll also release this change as zope.app.wsgi 3.15.0, or do you think
this should be 4.0.0?

Jim

--
Jim Fulton
http://www.linkedin.com/in/jimfulton
___
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] zope.app.wsgi.paste doesn't emit a ProcessStarting event

2012-01-18 Thread Michael Howitz
Am 19.01.2012 um 00:50 schrieb Marius Gedminas:
[...]
> 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?


Fixed, I unhid the 3.14.0 release additionally to the 3.9.3zc2 one.

Yours sincerely,
-- 
Michael Howitz · m...@gocept.com · software developer
gocept gmbh & co. kg · Forsterstraße 29 · 06112 Halle (Saale) · Germany
http://gocept.com · tel +49 345 1229889 8 · fax +49 345 1229889 1
Python, Pyramid, Plone, Zope - consulting, development, hosting, operations

___
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] zope.app.wsgi.paste doesn't emit a ProcessStarting event

2012-01-18 Thread Marius Gedminas
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

  
server %(run-directory)s/zeosock
  


  
formatter zope.exceptions.log.Formatter
path %(log-directory)s/z3.log
  
  
formatter zope.exceptions.log.Formatter
path STDOUT
  


"""
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


signature.asc
Description: Digital signature
___
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.app.wsgi.paste doesn't emit a ProcessStarting event

2012-01-18 Thread Jim Fulton
zope.app.server emits a ProcessStarting event on startup.

zope.app.wsgi.paste doesn't.  I think it should. If there are no
objections, I'll make a bug fix release for this.

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.

Jim

--
Jim Fulton
http://www.linkedin.com/in/jimfulton
___
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 )