Refactor or deprecate parent-child relationships between XBlocks
@kdmccormick ya está trabajando en esto.
Desde el 10/11/2025.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
This would be a long-term initiative. It probably belongs on the platform-roadmap.
Context
We have decided that parent-child relationships should only exist at/below the VerticalBlock: https://github.com/openedx/edx-platform/blob/master/docs/decisions/0006-role-of-xblock.rst
We have further discussed that parent-child relationships in their entirety should be removed; I'm not sure if we came to a consensus on that.
TODO -- Add more context ( @ormsbee , @kdmccormick , and @bradenmacdonald ).
Tasks
Off the top of my head...
- File a DEPR encompassing our plan to:
- Remove parent-child relationships on the base XBlock class. Delete the _HasChildrenMetaclass. Move all parent-child logic to a new subclass, XBlockWithChildren. Make it
XBlock.has_childrena read-only class property. Some details. - Raise an exception if
get_parentis called at or above the VerticalBlock level. - For all XBlockWithChildren subclasses above the VerticalBlock (so, CourseBlock, SectionBlock, and SequenceBlock): Move their implementations to either Learning Core or edx-platform djangoapps.
- Remove parent-child relationships on the base XBlock class. Delete the _HasChildrenMetaclass. Move all parent-child logic to a new subclass, XBlockWithChildren. Make it
- Decide: Should parent-child relationships still exist at/below the Vertical block?
- Either way -> ADR it.
- Yes -> We're done.
- No -> File another DEPR encompassing our plan to:
- Raise deprecation warnings on the XBlockWithChildren class.
- For all remaining XBlockWithChildren subclasses in edx-platform (eg, LibraryContentBlock, SplitTestBlock):
Move their implementations to either Learning Core or edx-platform djangoapps. - Write guidance on how custom XBlockWithChildren subclasses can be similarly migrated. Ensure that, for example, OpenCraft's ProblemBuilder block can be migrated using this guide.
- Delete the XBlockWithChildren class, and delete all parent-child logic from the XBlock repository.
- Delete all parent-child logic from modulestore and edx-platform's XBlock runtimes.
- Lenguaje dominante
- Python
- Estrellas
- 470
- Forks
- 231
- Merge medio
- 2 d 14 h
- PR fusionados (30 d)
- 7
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin 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 openedx/XBlock
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
-
performance
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 45/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
-
[DEPR]: Support for XBlock Runtimes with raw string scope IDsPosiblemente ocupada @salman2013 la tomó hace 211 días. Abiertodepr
openedx/XBlock#784 · 10 comentarios · 3 reacciones · 1 asignado ·
Todos los issues de openedx/XBlock
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
pyjanitor-devs/pyjanitor#1758 ·
Los mantenedores suelen responder en 1 día
-
bug ready for review
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
odysseus-dev/odysseus#6641 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
happypawspillaro/happypaws#78 ·
Los mantenedores suelen responder en 4 días
-
pydanty:is-working
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
pydantic/pydantic-ai#10020 ·
Los mantenedores suelen responder en 1 día
-
stdlib type-bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
python/cpython#159044 · 4 comentarios ·
Los mantenedores suelen responder en 1 día