@@ -90,7 +90,7 @@ pyconvert_rule_int(::Type{T}, x::Py) where {T<:Number} = begin
9090 # try converting -> int -> str -> BigInt -> T
9191 x_int = pyint (x)
9292 x_str = pystr (String, x_int)
93- pydel! (x_int)
93+ unsafe_pydel (x_int)
9494 v = parse (BigInt, x_str)
9595 return pyconvert_tryconvert (T, v)
9696 end
@@ -203,7 +203,7 @@ function _pyconvert_rule_iterable(ans::Vector{T0}, it::Py, ::Type{T1}) where {T0
203203 @label again
204204 x_ = unsafe_pynext (it)
205205 if pyisnull (x_)
206- pydel! (it)
206+ unsafe_pydel (it)
207207 return pyconvert_return (ans)
208208 end
209209 x = @pyconvert (T1, x_)
@@ -234,7 +234,7 @@ function _pyconvert_rule_iterable(ans::Set{T0}, it::Py, ::Type{T1}) where {T0,T1
234234 @label again
235235 x_ = unsafe_pynext (it)
236236 if pyisnull (x_)
237- pydel! (it)
237+ unsafe_pydel (it)
238238 return pyconvert_return (ans)
239239 end
240240 x = @pyconvert (T1, x_)
@@ -271,7 +271,7 @@ function _pyconvert_rule_mapping(
271271 @label again
272272 k_ = unsafe_pynext (it)
273273 if pyisnull (k_)
274- pydel! (it)
274+ unsafe_pydel (it)
275275 return pyconvert_return (ans)
276276 end
277277 v_ = pygetitem (x, k_)
@@ -378,24 +378,24 @@ function pyconvert_rule_iterable(
378378 it = pyiter (x)
379379 k_ = unsafe_pynext (it)
380380 if pyisnull (k_)
381- pydel! (it)
382- pydel! (k_)
381+ unsafe_pydel (it)
382+ unsafe_pydel (k_)
383383 return pyconvert_unconverted ()
384384 end
385385 k = @pyconvert (K1, k_)
386386 v_ = unsafe_pynext (it)
387387 if pyisnull (v_)
388- pydel! (it)
389- pydel! (v_)
388+ unsafe_pydel (it)
389+ unsafe_pydel (v_)
390390 return pyconvert_unconverted ()
391391 end
392392 v = @pyconvert (V1, v_)
393393 z_ = unsafe_pynext (it)
394- pydel! (it)
394+ unsafe_pydel (it)
395395 if pyisnull (z_)
396- pydel! (z_)
396+ unsafe_pydel (z_)
397397 else
398- pydel! (z_)
398+ unsafe_pydel (z_)
399399 return pyconvert_unconverted ()
400400 end
401401 K2 = Utils. _promote_type_bounded (K0, typeof (k), K1)
@@ -421,7 +421,7 @@ function pyconvert_rule_iterable(::Type{R}, x::Py) where {R<:NamedTuple}
421421 pyistuple (x) || return pyconvert_unconverted ()
422422 names2_ = pygetattr (x, " _fields" , pybuiltins. None)
423423 names2 = @pyconvert (names === nothing ? Tuple{Vararg{Symbol}} : typeof (names), names2_)
424- pydel! (names2_)
424+ unsafe_pydel (names2_)
425425 names === nothing || names === names2 || return pyconvert_unconverted ()
426426 types2 = types === nothing ? NTuple{length (names2),Any} : types
427427 vals = @pyconvert (types2, x)
@@ -461,7 +461,7 @@ function pyconvert_rule_datetime(::Type{DateTime}, x::Py)
461461 days = pyconvert (Int, d. days)
462462 seconds = pyconvert (Int, d. seconds)
463463 microseconds = pyconvert (Int, d. microseconds)
464- pydel! (d)
464+ unsafe_pydel (d)
465465 iszero (mod (microseconds, 1000 )) || return pyconvert_unconverted ()
466466 return pyconvert_return (
467467 _base_datetime +
0 commit comments