File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -66,10 +66,12 @@ pylazyobject(mk) = PyObject(Val(:lazy), mk)
6666
6767C. PyObject_TryConvert__initial (o, :: Type{PyObject} ) = C. putresult (pyborrowedobject (o))
6868
69- Base. convert (:: Type{PyObject} , x:: PyObject ) = x
70- Base. convert (:: Type{Any} , x:: PyObject ) = x
71- Base. convert (:: Type{T} , x:: PyObject ) where {T} = x isa T ? x : pyconvert (T, x)
72- Base. convert (:: Type{PyObject} , x) = PyObject (x)
69+ # These cause a LOT of method invalidations and slow down package load by a couple of
70+ # seconds. You can always use PyObject and pyconvert to go in either direction.
71+ # Base.convert(::Type{PyObject}, x::PyObject) = x
72+ # Base.convert(::Type{Any}, x::PyObject) = x
73+ # Base.convert(::Type{T}, x::PyObject) where {T} = x isa T ? x : pyconvert(T, x)
74+ # Base.convert(::Type{PyObject}, x) = PyObject(x)
7375
7476# ## Cache some common values
7577
You can’t perform that action at this time.
0 commit comments