Changes between Initial Version and Version 1 of Ticket #32403, comment 2


Ignore:
Timestamp:
Feb 1, 2021, 2:58:22 PM (4 years ago)
Author:
Kazantcev Andrey

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32403, comment 2

    initial v1  
    11Replying 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 refused
    5 >         Is the server running on host "localhost" (127.0.0.1) and accepting
    6 >         TCP/IP connections on port 5432?
    7 > }}}
    8 >
    92> Can you share more details or a database configuration?
    103
    114Configuration
    12 ```
     5{{{
    136DATABASES = {
    147    'default': {
     
    2215    }
    2316}
    24 ```
     17}}}
    2518
    2619I 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`
Back to Top