[Python] Compiler annotations for ownership semantics
Los mantenedores suelen responder en 1 día
@aaronj0 ya está trabajando en esto.
Desde el 16/3/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Feature description
It would be great if ownership semantics can be communicated in the C++ source code via annotations, so we don't have to write Pythonizations by hand just for this, and carefully keep them in sync with the behavior of the C++ code.
This is relevant for both arguments and return values.
For arguments, we need something to indicate ownership adoption (_transfer_ownership is just a placeholder name to illustrate the idea):
void foo(TObject * _transfer_ownership obj) {
std::unique_ptr<TObject>{obj};
}
For return values, we need something to indicate ownership on the caller side (_caller_owns is again just a placeholder):
TObject *_caller_owns bar() {
return new TObject{};
}
Object ownership problems come up often on the forum (example post), so having a robust way to convey the correct ownership semantics would be a game changer for the robustness of the ROOT Python interfaces.
Alternatives considered
- Manual Pythonizations like in ee79dfd85c2f, but this doesn't scale well.
- Migrating C++ interfaces to smart pointers, but this would break backwards compatibility.
- Lenguaje dominante
- C++
- Estrellas
- 3.3k
- Forks
- 1.6k
- Merge medio
- 2 d 17 h
- PR fusionados (30 d)
- 188
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de root-project/root
-
thisroot.sh: wrong ROOTSYS in zsh when the shell's command line has a newlinePosiblemente ocupada @dpiparo la tomó hace 4 días. Abiertobug in:Build System
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
root-project/root#23746 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[tmva][sofie] Inputs of unsupported type (e.g. float16) give code that does not compile instead of an errorPosiblemente ocupada @lmoneta la tomó hace 13 días. AbiertoAI-Assisted bug in:SOFIE
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
root-project/root#23655 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[RDataFrame] Code that transforms `#var` alias to `R_rdf_sizeof_var` does not respect string literalsPosiblemente ocupada @vepadulano la tomó hace 1 día. Abiertobug in:RDataFrame
Dificultad 3/5 1-2 días Aptitud para principiantes 71/100
root-project/root#23790 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
TDataMember::GetOffset interfers to TDataMember::GetOffsetCintPosiblemente ocupada @pcanal la tomó hoy. Abiertobug in:Core Libraries
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
root-project/root#23777 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
`TChain::GetEntries` internal caching ineffective?Posiblemente ocupada @pcanal la tomó hace 6 días. Abiertoimprovement in:TTree
root-project/root#23738 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de root-project/root
Issues similares
-
Plugin storage: send reason codes, not English sentences, so the overview can translate themAbiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
prestonbrown/helixscreen#1867 ·
Los mantenedores suelen responder en 2 días
-
bug P5 XS
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
open-astro/AlpacaBridge#1550 ·
Los mantenedores suelen responder en 1 día
-
Component: Packaging Type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
LizardByte/libvirtualhid#204 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Niko1221/Strata#3785 · 2 comentarios ·
Los mantenedores suelen responder en 3 días