comparison roundup/rest.py @ 8536:5800afdebded

bug: remove performance and tracing decorators. Accidently commited as part of 8534:1f8492d68aca rest.py change.
author John Rouillard <rouilj@ieee.org>
date Sat, 21 Mar 2026 21:40:57 -0400
parents 1f8492d68aca
children a4f017ae1477
comparison
equal deleted inserted replaced
8535:4184173d364f 8536:5800afdebded
32 from roundup.anypy.strings import b2s, bs2b, is_us, u2s 32 from roundup.anypy.strings import b2s, bs2b, is_us, u2s
33 from roundup.cgi.exceptions import NotFound, PreconditionFailed, Unauthorised 33 from roundup.cgi.exceptions import NotFound, PreconditionFailed, Unauthorised
34 from roundup.exceptions import Reject, UsageError 34 from roundup.exceptions import Reject, UsageError
35 from roundup.i18n import _ 35 from roundup.i18n import _
36 from roundup.rate_limit import Gcra, RateLimit 36 from roundup.rate_limit import Gcra, RateLimit
37 from roundup.timer import timer
38 37
39 logger = logging.getLogger('roundup.rest') 38 logger = logging.getLogger('roundup.rest')
40 39
41 try: 40 try:
42 # if dicttoxml2 41 # if dicttoxml2
2431 {"requested": 2430 {"requested":
2432 self.client.request.headers.get('Accept'), 2431 self.client.request.headers.get('Accept'),
2433 "acceptable": ", ".join(sorted( 2432 "acceptable": ", ".join(sorted(
2434 self.__accepted_content_type.keys()))})) 2433 self.__accepted_content_type.keys()))}))
2435 2434
2436 @timer(name="rest_dispatch", tag="args[2]",
2437 writer=logging.getLogger('roundup.timer').error)
2438 def dispatch(self, method, uri, input_payload): 2435 def dispatch(self, method, uri, input_payload):
2439 """format and process the request""" 2436 """format and process the request"""
2440 output = None 2437 output = None
2441 2438
2442 # Before we do anything has the user hit the rate limit. 2439 # Before we do anything has the user hit the rate limit.
2748 2745
2749 ''' 2746 '''
2750 2747
2751 __slots__ = ("json_dict", "value") 2748 __slots__ = ("json_dict", "value")
2752 2749
2753 @timer(name="simultateFieldStorage", tag="args[1][:10]",
2754 writer=logging.getLogger('roundup.timer').error)
2755 def __init__(self, json_string): 2750 def __init__(self, json_string):
2756 '''Parse the json string into an internal dict. 2751 '''Parse the json string into an internal dict.
2757 2752
2758 Because spec for rest post once exactly (POE) shows 2753 Because spec for rest post once exactly (POE) shows
2759 posting empty content. An empty string results in an empty 2754 posting empty content. An empty string results in an empty

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