is there a plan to support `async with`
- Linguagem predominante
- Python
- Estrelas
- 431
- Forks
- 57
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
I noticed that we should close the zmq stream by function close.is there a plan to use async with like:
```python
async with aiozmq.create_zmq_stream(
zmq.PAIR,
bind=addr) as server:
while True:
server.write(b"Server message to client")
try:
data = await server.read()
except asyncio.CancelledError:
break
print("Async server read: {data}".format(data=data))
asyncio.sleep(1)
```
Guia de contribuição
Direção de pesquisa
Start by locating aiozmq.create_zmq_stream and its close() behavior, then inspect the stream lifecycle and existing asyncio integration. Compare that lifecycle with the proposed async with usage and determine the tests needed to show that entering and leaving the context manages the stream correctly.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- python
- Domínio
- networking
- Tipo de issue
- Funcionalidade
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Status de atividade
- Estagnada
- Clareza
- Precisa de esclarecimento
- Facilidade para iniciantes
- 25/100