maxsize=0 in create_pool raise TypeError
- Linguagem predominante
- Python
- Estrelas
- 1.4k
- Forks
- 170
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
if I set `maxsize=0` in `create_pool`, occasionally I got
```sh
Traceback (most recent call last):
File "/xxx/lib/python3.5/site-packages/tornado/web.py", line 1511, in _execute
result = yield result
File "/xxx/lib/python3.5/site-packages/tornado/gen.py", line 1055, in run
value = future.result()
File "/xxx/lib/python3.5/site-packages/tornado/concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "", line 4, in raise_exc_info
File "/xxx/lib/python3.5/site-packages/tornado/gen.py", line 307, in wrapper
yielded = next(result)
File "", line 6, in _wrap_awaitable
File "/yyy.py", line 34, in extract_pg
with (await pool.cursor(cursor_factory=cursor)) as cur:
File "/xxx/lib/python3.5/site-packages/aiopg/pool.py", line 263, in cursor
conn = yield from self.acquire()
File "/xxx/lib/python3.5/site-packages/aiopg/utils.py", line 67, in __iter__
resp = yield from self._coro
File "/xxx/lib/python3.5/site-packages/aiopg/pool.py", line 170, in _acquire
yield from self._fill_free_pool(True)
File "/xxx/lib/python3.5/site-packages/aiopg/pool.py", line 212, in _fill_free_pool
if override_min and self.size < self.maxsize:
TypeError: unorderable types: int() < NoneType()
```
using `aiopg=0.13.0`
Guia de contribuição
Direção de pesquisa
Start in aiopg/pool.py at _acquire and _fill_free_pool, following the create_pool(maxsize=0) path shown in the traceback. Reproduce the reported TypeError with that configuration, then verify the corrected behavior and add or run a regression test covering maxsize=0.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- postgresql, python
- Domínio
- backend, databases
- Tipo de issue
- Bug
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100