Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Runtime feature mix-in pattern

Abierto
#104 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python
Área
backend

Línea de trabajo

Empieza por localizar el manejo de la configuración en tiempo de ejecución y el paso de creación de objetos descritos en el issue; después, sigue la estructura de herencia de Service y Endpoint. La tarea estará terminada cuando la configuración en tiempo de ejecución pueda definir una lista ordenada de clases mix-in y el tipo del objeto creado utilice ese orden de herencia, manteniendo el comportamiento cooperativo de super().

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement major/framework effort

The number of potentially desirable features on top of the basic dripline objects (Service and Endpoint) is large and it does not really make organizational sense to put everything into a single class. In some cases, the expected behaviors may even be mutually incompatible.

Rather than trying to create some set of derived classes that implement every possible useful combination, we propose the following pattern:

  • additional features are implemented as mix-in classes, each inheriting from the lowest possible base class
  • method overrides should never re-implement the logic from the base class, they should use super() to re-use that logic (but may alter the arguments passed or process the results returned as appropriate). They should also also not call the parent method directly, but should use super, so that all overrides are called in order when there is possibly multiple inheritance.
  • because inheritance order is unknown, every class's __init__ should be designed in such a way that being called more than once is not problematic
  • in runtime config, a user specifies the (ordered) list of mix in classes to be used. The user is responsible for understanding the compatibility implications and ordering of inheritance.
  • at runtime, the object creation step should define a new object type with the inheritance set as defined
Lenguaje dominante
Python
Estrellas
3
Forks
6
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

  • Incluye un Dockerfile o un archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de driplineorg/dripline-python

Todos los issues de driplineorg/dripline-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.