|
90 | 90 | pyjl_handle_error_type(::typeof(pyjlany_callback), self, exc::MethodError) = |
91 | 91 | exc.f === self ? pybuiltins.TypeError : PyNULL |
92 | 92 |
|
93 | | -function pyjlany_call_nogil(self, args_::Py, kwargs_::Py) |
94 | | - if pylen(kwargs_) > 0 |
95 | | - args = pyconvert(Vector{Any}, args_) |
96 | | - kwargs = pyconvert(Dict{Symbol,Any}, kwargs_) |
97 | | - ans = pyjl(self(args...; kwargs...)) |
98 | | - elseif pylen(args_) > 0 |
99 | | - args = pyconvert(Vector{Any}, args_) |
100 | | - ans = pyjl(self(args...)) |
101 | | - else |
102 | | - ans = pyjl(self()) |
103 | | - end |
104 | | - unsafe_pydel(args_) |
105 | | - unsafe_pydel(kwargs_) |
106 | | - ans |
107 | | -end |
108 | | -pyjl_handle_error_type(::typeof(pyjlany_call_nogil), self, exc::MethodError) = |
109 | | - exc.f === self ? pybuiltins.TypeError : PyNULL |
110 | | - |
111 | 93 | function pyjlany_getitem(self, k_::Py) |
112 | 94 | if self isa Type |
113 | 95 | if pyistuple(k_) |
@@ -607,10 +589,6 @@ class Jl(JlBase2): |
607 | 589 | return self._jl_callmethod($(pyjl_methodnum(Py))) |
608 | 590 | def jl_callback(self, *args, **kwargs): |
609 | 591 | return self._jl_callmethod($(pyjl_methodnum(pyjlany_callback)), args, kwargs) |
610 | | - def jl_call_nogil(self, *args, **kwargs): |
611 | | - '''Compatibility alias for calling this Julia object. Python resources are |
612 | | - relinquished automatically while Julia code runs.''' |
613 | | - return self._jl_callmethod($(pyjl_methodnum(pyjlany_call_nogil)), args, kwargs) |
614 | 592 | def _repr_mimebundle_(self, include=None, exclude=None): |
615 | 593 | return self._jl_callmethod($(pyjl_methodnum(pyjlany_mimebundle)), include, exclude) |
616 | 594 | @property |
|
0 commit comments