-
Notifications
You must be signed in to change notification settings - Fork 78
Closed as not planned
Milestone
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_Xwhere X is CPython, Base (Pyand 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
PyArrayis parameterised. - Change
pyconvertto use a simpler explicit branching logic (branching on the target type and the python type). - Maybe change
pyconvertto prefer copying conversion over wrapping. - Change
pyconvertto take keyword arguments to more finely control the conversion. For examplecopy=trueto 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@pyconstinstead. - Check for
threadid() == 1in finalisers. - Make all values in JuliaCall be of the same
JuliaValuetype (orJl?), just as all Python values in PythonCall are of the samePytype. Implement wrappers on top of this. - Add a constructor
JuliaValue(x).
Metadata
Metadata
Assignees
Labels
No labels