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

Async state and message handler

Abierto
#1,005 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

  • #1411 de @Nikhil172913832 — cerrado sin fusionar

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
python
Área
testing-qa

Línea de trabajo

Comienza localizando los puntos de entrada state_handler y message_handler y leyendo cómo se invocan actualmente las funciones síncronas. Compara los requisitos de asyncio, trio y curio, incluidos ContextVar y los efectos sobre los hilos; se considera terminado cuando los handlers asíncronos compatibles funcionan sin romper los handlers síncronos existentes y están cubiertos por pruebas.

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

Descripción

area:core difficulty:medium type:feature
Have you read the Contributing Guidelines on issues?
Description

Original suggestion by Val on Slack

To allow the state_handler and message_handler functions to handle asynchronous functions.

Motivation

These two functions are used to interface with code outside of Pact Python to setup/teardown states and generate messages. Especially in the case of the state setup and teardown, a common pattern would be to make a number of calls to (mocked or not) databases or other services to ensure they are in a particular state. These requests can be significantly sped up by running them in parallel, such as with an asyncio.gather call or using a task group.

Have you tried building it?

Not yet, but I will first open this issue and ask for anyone with specific examples to work towards.

While asynchronous function bring a number of advantages, they can also bring some complications. In particular:

  • There are a number of underlying runtimes: asyncio, trio, curio. If possible, it would be ideal to support all of these.
  • The use of threads has implications for ContextVar (if used)
Self-service
  • I'd be willing to contribute this feature to Pact Python myself.
Lenguaje dominante
Python
Estrellas
685
Forks
147
Merge medio
4 d 8 h
PR fusionados (30 d)
14

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

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 pact-foundation/pact-python

Todos los issues de pact-foundation/pact-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.