Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roadmap to v1 #311

Closed
cjdoris opened this issue May 18, 2023 · 2 comments
Closed

Roadmap to v1 #311

cjdoris opened this issue May 18, 2023 · 2 comments
Milestone

Comments

@cjdoris
Copy link
Collaborator

cjdoris commented May 18, 2023

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).
@Moelf
Copy link

Moelf commented Jun 13, 2023

just want to say we really need Preferences.jl based solution

@github-actions github-actions bot added the stale Issues about to be auto-closed label Aug 19, 2023
@cjdoris cjdoris removed the stale Issues about to be auto-closed label Aug 19, 2023
@cjdoris cjdoris added this to the v1 milestone Aug 19, 2023
@JuliaPy JuliaPy deleted a comment from github-actions bot Aug 19, 2023
@cjdoris
Copy link
Collaborator Author

cjdoris commented Nov 4, 2023

Closing because I now have a v1 roadmap with issues covering all of these points.

@cjdoris cjdoris closed this as not planned Won't fix, can't repro, duplicate, stale Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants