File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -196,6 +196,8 @@ cdef class Loop:
196
196
197
197
cdef _set_coroutine_wrapper(self , bint enabled)
198
198
199
+ cdef _print_debug_info(self )
200
+
199
201
200
202
include " cbhandles.pxd"
201
203
Original file line number Diff line number Diff line change @@ -1024,14 +1024,11 @@ cdef class Loop:
1024
1024
""" This method is used by uvloop tests and is not part of the API."""
1025
1025
return uv.uv_backend_fd(self .uvloop)
1026
1026
1027
- def print_debug_info (self ):
1027
+ cdef _print_debug_info (self ):
1028
1028
cdef:
1029
1029
int err
1030
1030
uv.uv_rusage_t rusage
1031
1031
1032
- if not UVLOOP_DEBUG:
1033
- raise NotImplementedError
1034
-
1035
1032
err = uv.uv_getrusage(& rusage)
1036
1033
if err < 0 :
1037
1034
raise convert_error(err)
@@ -1121,6 +1118,13 @@ cdef class Loop:
1121
1118
1122
1119
print (flush= True )
1123
1120
1121
+ property print_debug_info :
1122
+ def __get__ (self ):
1123
+ if UVLOOP_DEBUG:
1124
+ return lambda : self ._print_debug_info()
1125
+ else :
1126
+ raise AttributeError (' print_debug_info' )
1127
+
1124
1128
# Public API
1125
1129
1126
1130
def __repr__ (self ):
You can’t perform that action at this time.
0 commit comments