Skip to content

Roadmap to v1 #311

Closed as not planned
Closed as not planned
@cjdoris

Description

@cjdoris

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 example copy=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 if pydel!(Py(x)) is safe. Use this to automatically pydel! stuff where possible, e.g. in @py.
  • Put unsafe_ prefix on unsafe functions like pydel! and pynew() 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 (or Jl?), just as all Python values in PythonCall are of the same Py type. Implement wrappers on top of this.
  • Add a constructor JuliaValue(x).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions