And another one that seemed to vanish into thing air. On 31/01/2006, at 10:11 PM, Matt Carpenter wrote:
> > > Graham Dumpleton wrote: >> Regardless of how you might use it, from a technical standpoint I >> would say that >> it is not going to be possible at present. >> >> One could imagine being able to write a separate C based Apache >> module which >> provides Python based wrappings for the DAV specific data >> structures that the >> repository hook function use. As documented in: >> >> http://docx.webperf.org/structdav__hooks__repository.html >> >> But, there are a few things missing. First, is there is no way to >> obtain references to >> the Python interpreter instances held by mod_python, the >> mechanisms for >> creating them and acquiring locks against them from a distinct >> Apache module. >> Similarly, there is there is no way to access the mod_python >> Python request_rec >> wrapper object etc. >> >> Both of these and possibly other stuff would be required. You do >> not want to go >> having to duplicate all this stuff as it sort of defeats the >> purpose and would >> possibly prevent use of mod_python and your module in the same Apache >> instance. >> >> What would be an interesting area for investigation in the future >> would be to >> work out whether there are functions within the mod_python module >> which could >> be exposed using the Apache APR_RETRIEVE_OPTIONAL_FN() interface. >> This would allow distinct modules to dynamically obtain references >> to some >> of the internals of mod_python so as to perhaps make use of all >> the machinery >> it has already for manipulating Python interpreters, as well as >> existing Python >> object wrappers for Apache structures. >> >> The end result would be the ability to create distinct C based >> Apache modules >> which themselves can also make use of Python by bootstrapping of >> mod_python. >> It may be tricky to work out how to do it and come up with a good >> interface design, >> but certainly would be interesting. >> >> Graham > How does mod_python hook into apache as it stands? Would it be > conceivably possible to have mod_python itself create the > dav_hooks_repository with a small patch to mod_python to provide a > new Python*Handler? > Apologies for the vagueness.. My knowledge of modular C programming > is very sketchy. It is technically possible to do it this way, ie., for mod_python to register hooks for dav, but this is highly unlikely to be acceptable as it means one is starting to lump into mod_python all this extra stuff which has nothing to do with its core purpose. It would just make things hard to maintain as for every mod_python release you then have to test all that extra stuff as well. If anything were to be done to allow working more closely with other Apache modules, the far preferable approach is that I outlined. That way mod_python has only to provide minimal generic module interface. All the hard stuff is then external to mod_python in modules maintained by other and doesn't impact development of mod_python itself. Matt, can you please keep the discussion cc'd to the mailing list, as probably of general interest. Graham