quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Dumpleton <grah...@dscpl.com.au>
Subject Changes made to apache.register_cleanup()
Date Wed, 08 Mar 2006 09:50:55 GMT

A while back you made the following change:

r378072 | nlehuen | 2006-02-16 06:41:25 +1100 (Thu, 16 Feb 2006) | 5 

- Fixed the unit tests for apache.register_cleanup 
server.register_cleanup. Ther
e is not way it could have passed before, yet it did ???
- Corrected the documentation about those two functions, it was badly 
- Added a warning so that users don't try to pass a request object as 
the argume
nt to the callable.

You say that you don't understand how old test failed, but I don't
understand how the new test wouldn't fail.

The apache.register_cleanup() function is defined as:

   def register_cleanup(handler,data=None):

Ie., the visible method takes two arguments. You changed the test to
call it with 4.

def apache_register_cleanup(req):

     apache.register_cleanup(req.interpreter, req.server, 
server_cleanup, "apache_register_cleanup test ok")
     req.write("registered server cleanup that will write to log")

     return apache.OK

It is only the hidden version of register_cleanup() in the _apache
module which takes 4.

As a result, the changes made to the documentation aren't correct 

I'll try and work out why the test harness doesn't fail with code as now
written, although it is probably all academic given that as described
in MODPYTHON-109, the server based register cleanup functions will not
reliably run anyway.

Most strange.


View raw message