Skip to content

Commit

Permalink
remove lingering references to _Py
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Doris committed Mar 19, 2024
1 parent 7129a0d commit 98aa589
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Compat/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Misc bits and bobs for compatibility.
module Compat
using ..PythonCall: PythonCall # needed for docstring cross-refs
using ..Core
using ..Core: C, Utils, pynew, incref, getptr, pycopy!, pymodulehooks, pyisnull, pybytes_asvector, pysysmodule, pyosmodule, pystr_fromUTF8
using ..Core: Core, C, Utils, pynew, incref, getptr, pycopy!, pymodulehooks, pyisnull, pybytes_asvector, pysysmodule, pyosmodule, pystr_fromUTF8
using ..Convert: pyconvert, @pyconvert
using ..Wrap: PyArray, PyPandasDataFrame
using Serialization: Serialization, AbstractSerializer, serialize, deserialize
Expand Down
2 changes: 1 addition & 1 deletion src/Compat/gui.jl
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function init_gui()
pycopy!(new_event_loop_callback, g["new_event_loop_callback"])

# add a hook to automatically call fix_qt_plugin_path()
fixqthook = Py(() -> (_Py.CONFIG.auto_fix_qt_plugin_path && fix_qt_plugin_path(); nothing))
fixqthook = Py(() -> (Core.CONFIG.auto_fix_qt_plugin_path && fix_qt_plugin_path(); nothing))
pymodulehooks.add_hook("PyQt4", fixqthook)
pymodulehooks.add_hook("PyQt5", fixqthook)
pymodulehooks.add_hook("PySide", fixqthook)
Expand Down
2 changes: 1 addition & 1 deletion src/Compat/pycall.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function init_pycall(PyCall::Module)
- Set the environment variable `PYTHON` to `PythonCall.C.CTX.exe_path` and rebuild PyCall. This forces PyCall
to use the same interpreter as PythonCall, but needs to be repeated whenever you switch Julia environment.
"""
@eval function _Py.Py(x::$PyCall.PyObject)
@eval function Core.Py(x::$PyCall.PyObject)
C.CTX.matches_pycall::Bool || error($errmsg)
return pynew(C.PyPtr($PyCall.pyreturn(x)))
end
Expand Down
1 change: 1 addition & 0 deletions src/JlWrap/JlWrap.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ using ..PythonCall: PythonCall
using ..Core
using ..Core: C, Utils, pynew, @autopy, incref, decref, setptr!, getptr, pyjuliacallmodule, pycopy!, errcheck, errset, PyNULL, pyistuple, pyisnull, pyJuliaError, pydel!, pyistype, pytypecheck, pythrow, pytuple_getitem, pyisslice, pystr_asstring, pyosmodule, pyisstr
using ..Convert: pyconvert, @pyconvert, PYCONVERT_PRIORITY_WRAP, pyconvert_add_rule, pyconvert_tryconvert, pyconvertarg, pyconvert_result
using ..GC: GC

using Pkg: Pkg
using Base: @propagate_inbounds, allocatedinline
Expand Down
2 changes: 1 addition & 1 deletion src/JlWrap/objectarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ PyObjectArray(undef::UndefInitializer, dims::Vararg{Integer,N}) where {N} = PyOb
PyObjectArray{N}(x::AbstractArray{T,N}) where {T,N} = copyto!(PyObjectArray{N}(undef, size(x)), x)
PyObjectArray(x::AbstractArray{T,N}) where {T,N} = PyObjectArray{N}(x)

pyobjectarray_finalizer(x::PyObjectArray) = _Py.GC.enqueue_all(x.ptrs)
pyobjectarray_finalizer(x::PyObjectArray) = GC.enqueue_all(x.ptrs)

Base.IndexStyle(x::PyObjectArray) = Base.IndexStyle(x.ptrs)

Expand Down

0 comments on commit 98aa589

Please sign in to comment.