[Python-Dev] Patch logging module for IronPython compatibility (original) (raw)
Michael Foord fuzzyman at voidspace.org.uk
Tue Feb 17 11:31:26 CET 2009
- Previous message: [Python-Dev] Patch logging module for IronPython compatibility
- Next message: [Python-Dev] 2 very interesting projects - Python / Finance
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Michael Foord wrote:
Hello all,
Issue 5287 is a patch for the logging module for compatibility with IronPython. IronPython provides sys.getframe but it throws an exception if you call it with a non-zero depth. This may be fixed in a future version of IronPython. http://bugs.python.org/issue5287 It doesn't at all change the behaviour on other platforms (does an explicit platform check I'm afraid) but fixes a nasty problem with the logging module not working at all on IronPython. As this is a bugfix for IronPython at least and IronPython 2.6 is currently being worked on (tracking Python 2.6) it would be great to get this into 2.6-maint.
I've submitted an alternative patch that catches the error _getframe raises on IronPython. As it is possible that _getframe will work on IronPython in the future (although it is likely to be enabled by a switch as tracking Python frames has a performance cost) this is a slightly more future proof solution.
Michael
All the best, Michael
-- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog
- Previous message: [Python-Dev] Patch logging module for IronPython compatibility
- Next message: [Python-Dev] 2 very interesting projects - Python / Finance
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]