Re: OT: Python C API and reference counting

2006-11-10 Thread Dan Eloff
On 11/9/06, Graham Dumpleton <[EMAIL PROTECTED]> wrote: I would have assumed that the code is safe as the calling Python stack frame still holds a reference count on any objects passed to you and since it is waiting for you to finish, even if in an allow threads state, there shouldn't be anyway t

OT: Python C API and reference counting

2006-11-09 Thread Dan Eloff
I know this isn't about mod_python, but I can think of nobody better qualified to answer this question than mod_python developers. If in a C function you release the GIl using begin/end allow threads, does it change your responsibilites with regard to the reference counts on the input parameters?

Re: Python 2.5 nested auth functions in publisher.

2006-10-28 Thread Dan Eloff
On 10/28/06, Graham Dumpleton <[EMAIL PROTECTED]> wrote: Dan, the code that needs to be updated is: if "__auth__" in func_code.co_names: i = list(func_code.co_names).index("__auth__") __auth__ = func_code.co_consts[i+1] if hasattr(__auth__, "co_nam

Re: Changes to what is displayed when handler exception occurs.

2006-10-27 Thread Dan Eloff
I know we have talked a bit before about providing a means of allowing people to return custom error pages and I haven't forgotten that. The cleanup of the code and working out what the report error function should take in the way of arguments is a first step to seeing how the ability to override

Re: Python 2.5 nested auth functions in publisher.

2006-10-27 Thread Dan Eloff
On 10/27/06, Graham Dumpleton <[EMAIL PROTECTED]> wrote: Unless they have really screwed things around, co_varnames is specifically for function argument names and is unlikely to contained nested constant names. If it did, then I would expect a lot of the publisher code to break in other ways as

Re: Python 2.5 nested auth functions in publisher.

2006-10-27 Thread Dan Eloff
On 10/27/06, Graham Dumpleton <[EMAIL PROTECTED]> wrote: Jim sent this to me when the python-dev list was down for maintenance. Can anyone with Python 2.5 who knows something about function internals enlighten us about what may have changed here. Previously the names of nested functions appeared

Re: core dumps because of expat symbols, python-2.5 seems to solve it

2006-10-08 Thread Dan Eloff
On 10/8/06, solo turn <[EMAIL PROTECTED]> wrote: when does mod_python support python-2.5? I'm running mod_python on 2.5 for more than two weeks now without any problems that I've been aware of. Grab the trunk version from the subversion and have fun. -Dan

Re: Fix to compile trunk on windows

2006-09-11 Thread Dan Eloff
On 9/11/06, Nicolas Lehuen <[EMAIL PROTECTED]> wrote: Sorry I usually don't use the VS GUI to build mod_python, only the dist/build_installer.bat script. I didn't even notice there was a VS .vcproject file until now :). That's why I haven't noticed the problem. Not your fault, probably mine for

Fix to compile trunk on windows

2006-09-10 Thread Dan Eloff
I get the following linker errors when trying to compile mod_python as fetched from the svn tonight. mod_python error LNK2019: unresolved external symbol __imp__MpFinfo_FromFinfo referenced in function _getreq_rec_fi mod_python error LNK2019: unresolved external symbol __imp__MpFinfo_New referenc

Re: Proposal for adding html formatted tracebacks

2006-09-03 Thread Dan Eloff
On 9/2/06, Graham Dumpleton <[EMAIL PROTECTED]> wrote: registering custom response handlers for error response codes. http://www.kuzbass.ru/docs/apache_c_mod_perl/142.htm It may be of use to be able to register such handlers from within a mod_python handler rather than relying on ErrorDocume

Re: Proposal for adding html formatted tracebacks

2006-08-27 Thread Dan Eloff
On 8/27/06, Graham Dumpleton <[EMAIL PROTECTED]> wrote: Hmmm, I didn't think you were wanting to go to that level of customisation. I've only mocked up the idea, it would probably be between 5-8 hours work to finish it as described. If you do, I would suggest that we add a new directive to mo

Proposal for adding html formatted tracebacks

2006-08-27 Thread Dan Eloff
I've been using html formatted tracebacks in my handlers for a little while, and it's working rather well. Here's my proposal to add it to mod_python. Once we've reached agreement I'll add it and attach the files. -Add a file exception.html to mod_python directory, it is the standalone html page

Re: HTML formatted traceback

2006-08-16 Thread Dan Eloff
I'll agree that mod_python 3.3 tracebacks are perhaps longer than they need to be given that I factored out various stuff into some functions so as to be able to reuse it across connection, handler and filter dispatch. I also like the idea of using colour to highlight important stuff. Thus, proba

HTML formatted traceback

2006-08-16 Thread Dan Eloff
I grew tired of scrolling down through the very long tracbacks to get to the actual error, so I wrote a function that lets me skip everything up to my handler function. While I was at it I figured I may as well highlight the things I want to see to make the tracebacks easier to read. When I was fi

Re: New module importer - why not make it the default in 3.3?

2006-08-16 Thread Dan Eloff
The new importer gets my vote. I've been using it for a while now in my development servers and it works great. I've not discovered any bugs. I've verified it with PythonAutoReload and PythonDebug in any combination of On and Off. For a complex hierarchy of python files in with both set to off, I

Re: Graham: Suggested change to importer.py

2006-08-13 Thread Dan Eloff
On 8/12/06, Graham Dumpleton <[EMAIL PROTECTED]> wrote: On 13/08/2006, at 3:43 AM, Dan Eloff wrote: > I had some modules with circular imports and I only discovered that > this was a problem when I tried to discover why my modules were being > reimported constantly. I would su

Graham: Suggested change to importer.py

2006-08-12 Thread Dan Eloff
I had some modules with circular imports and I only discovered that this was a problem when I tried to discover why my modules were being reimported constantly. I would suggest that this code be changed to log an error that explicitly tells you that there's a circular import, and what the conseque

Re: Graham: Re Importer

2006-05-11 Thread Dan Eloff
Probably best to err on the side of caution. I don't mind the way it works now, and I'd rather have that than an unpredictable bug that takes frustrating hour upon hour to solve. -Dan On 5/11/06, Graham Dumpleton <[EMAIL PROTECTED]> wrote: On 12/05/2006, at 3:52 AM, Dan Elof

Re: Graham: Re Importer

2006-05-11 Thread Dan Eloff
On 5/10/06, Graham Dumpleton <[EMAIL PROTECTED]> wrote: Dan Eloff wrote .. > > This may turn out to be messy or not useful as is as well. Overall, I > > guess what we need to come up with is some example use cases where > > search paths are required and perhaps work from

Graham: Re Importer

2006-05-10 Thread Dan Eloff
Depending on how your modules are structured, it may not be quite as bad as having to add it to every file. At least not the look up of what path to use. This is because what you may be able to do is use the fact that if you supply an absolute or relative path to apache.import_module(), that the