Closed as not planned
Description
Just jotting down some thoughts on how to get PythonCall to v1. There are a bunch of API changes I want to make and other large changes to the code.
- Internally refactor the code into more modules,
PythonCall_X
where X is CPython, Base (Py
and related functionality), PyList, PySet, ..., JuliaValue (pyjl
), PyMacro (@py
), Convert (pyconvert
), MultiMedia, JuliaCall, etc. This will make it easier to reason about the package in smaller chunks and make the dependencies between various parts more explicit. In the future these could be split off into separate packages. - Maybe change how
PyArray
is parameterised. - Change
pyconvert
to use a simpler explicit branching logic (branching on the target type and the python type). - Maybe change
pyconvert
to prefer copying conversion over wrapping. - Change
pyconvert
to take keyword arguments to more finely control the conversion. For examplecopy=true
to force copying conversion. - Configure with Preferences.jl.
- Rewrite
@py
, splitting branches out into separate functions and removing MacroTools. - Add
pydel!_of_Py_is_safe(x)
returning true ifpydel!(Py(x))
is safe. Use this to automaticallypydel!
stuff where possible, e.g. in@py
. - Put
unsafe_
prefix on unsafe functions likepydel!
andpynew()
and/or remove them from the API. Recommend using@pyconst
instead. - Check for
threadid() == 1
in finalisers. - Make all values in JuliaCall be of the same
JuliaValue
type (orJl
?), just as all Python values in PythonCall are of the samePy
type. Implement wrappers on top of this. - Add a constructor
JuliaValue(x)
.
Metadata
Metadata
Assignees
Labels
No labels