Changes between Initial Version and Version 1 of Ticket #32403, comment 2
- Timestamp:
- Feb 1, 2021, 2:58:22 PM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #32403, comment 2
initial v1 1 1 Replying to [comment:1 Mariusz Felisiak]: 2 > Thanks for the report, however the builtin `django.db.backends.postgresql` backend (on Python `3.9.0+` and `3.8.5`) raises `Connection refused` for me (as expected):3 > {{{4 > django.db.utils.OperationalError: could not connect to server: Connection refused5 > Is the server running on host "localhost" (127.0.0.1) and accepting6 > TCP/IP connections on port 5432?7 > }}}8 >9 2 > Can you share more details or a database configuration? 10 3 11 4 Configuration 12 ``` 5 {{{ 13 6 DATABASES = { 14 7 'default': { … … 22 15 } 23 16 } 24 ``` 17 }}} 25 18 26 19 I found a problem. The problem is in [these lines](https://github.com/django/django/blob/f9cfd346f0222d86bfbac26ef5455806965bae6b/django/db/backends/postgresql/base.py#L324-L325). If I have one connection and test expression in if return false then function just return without reraise exception. And `contextmanager` raises error `RuntimeError: generator didn't yield`