diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-01-19 08:35:16 +0100 |
|---|---|---|
| committer | Carlton Gibson <carlton@noumenal.es> | 2021-02-10 10:20:54 +0100 |
| commit | ec0ff406311de88f4e2a135d784363424fe602aa (patch) | |
| tree | c1659b85ea145704a1b733d40a6a9a45e9332d0f /django/db/backends/postgresql/base.py | |
| parent | 9c6ba876928fd20194ac3238dc06aeae66d7bd50 (diff) | |
Fixed #32355 -- Dropped support for Python 3.6 and 3.7
Diffstat (limited to 'django/db/backends/postgresql/base.py')
| -rw-r--r-- | django/db/backends/postgresql/base.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/django/db/backends/postgresql/base.py b/django/db/backends/postgresql/base.py index 126f30b462..ad8d85da29 100644 --- a/django/db/backends/postgresql/base.py +++ b/django/db/backends/postgresql/base.py @@ -261,12 +261,7 @@ class DatabaseWrapper(BaseDatabaseWrapper): # For now, it's here so that every use of "threading" is # also async-compatible. try: - if hasattr(asyncio, 'current_task'): - # Python 3.7 and up - current_task = asyncio.current_task() - else: - # Python 3.6 - current_task = asyncio.Task.current_task() + current_task = asyncio.current_task() except RuntimeError: current_task = None # Current task can be none even if the current_task call didn't error |
