diff roundup/scripts/roundup_xmlrpc_server.py @ 8557:f80c566f5726

feat: improve store_trace_reason with extract parameter store_trace_reason() used embedded code to extract reason based on the location passed to the function. This change adds support for extract keyword that is a Python expression eval'ed when the underlying function/method is called. All callers now set the extract parameter. The prior embedded code has been removed from store_trace_reason(). Failure to eval the expression results in an roundup.logcontext error severity log. Also updated docs. Also replaced env['REQUEST_URI'] with env['PATH_INFO'] for web based entry points as REQUEST_URI isn't documented as a required key and some other front end (e.g. zope, cgi) might not supply this.
author John Rouillard <rouilj@ieee.org>
date Mon, 06 Apr 2026 22:10:23 -0400
parents fed0f839c260
children 9c3ec0a5c7fc
line wrap: on
line diff
--- a/roundup/scripts/roundup_xmlrpc_server.py	Mon Apr 06 01:30:55 2026 -0400
+++ b/roundup/scripts/roundup_xmlrpc_server.py	Mon Apr 06 22:10:23 2026 -0400
@@ -89,7 +89,7 @@
         return db
 
     @gen_trace_id()
-    @store_trace_url("xmlrpc-server")
+    @store_trace_url("xmlrpc-server", extract="args[0].path")
     def do_POST(self):
         """Extract username and password from authorization header."""
 

Roundup Issue Tracker: http://roundup-tracker.org/