Skip to content

Commit

Permalink
Address iscoroutine on python3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
amol- committed Mar 4, 2024
1 parent 731a434 commit dcbe153
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tg/support/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ class StackedObjectProxy(TurboGearsObjectProxy):
objects can be removed with _pop_object.
"""
_is_coroutine_marker = False # make sure inspect.iscoroutine doesn't crash

def __init__(self, default=NoDefault, name="Default"):
"""Create a new StackedObjectProxy
Expand All @@ -60,6 +62,7 @@ def _current_obj(self):
objects = self.____local__.objects
except AttributeError:
objects = None

if objects:
return objects[-1][0]
else:
Expand Down

0 comments on commit dcbe153

Please sign in to comment.