Proposal: rename `async def close()` to `async def aclose()` across aiohttp
Abierto
enhancement
- Lenguaje dominante
- Python
- Estrellas
- 16.5k
- Forks
- 2.4k
- Merge medio
- 17 h 22 min
- PR fusionados (30 d)
- 212
Descripción
### Describe the solution you'd like
`contextlib.aclosing()` expects the object to provide an `aclose()` coroutine, which it awaits automatically. This makes `aclose` the de-facto naming convention for asynchronous close methods.
For consistency with this convention, I propose renaming `async def close()` to `async def aclose()` on all aiohttp classes that currently expose an async `close()`. Backward compatibility should be preserved: the old `close()` should keep working but emit a `DeprecationWarning` when called.
### Related component
Server and Client
### Code of Conduct
- [x] I agree to follow the aio-libs Code of Conduct
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.