Repository: explorerhq/sql-explorer (language: python)

Issue:
Deprecation warnings for `ugettext_lazy`
Lots of messages like these:

```
explorer/models.py:61: RemovedInDjango40Warning: django.utils.translation.ugettext_lazy() is deprecated in favor of django.utils.translation.gettext_lazy().
```

This appears to be [a compat shim for Python 2](https://code.djangoproject.com/ticket/30165) - but since this library has [dropped Python 2 support](https://github.com/groveco/django-sql-explorer/blob/master/HISTORY.rst#200-2020-10-09), it should be safe to change uses of `ugettext_lazy` to `gettext_lazy`.


Discussion / hints:
@brettdh yeah I didn't get chance to look into when `gettext_lazy` was introduced. I'd imagine they included it in 2.2 so I'd be happy to swap to it already.

Fix patch:
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 00000000..ce420e5a
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,14 @@
+# http://editorconfig.org
+
+root = true
+
+[*]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+indent_style = space
+indent_size = 4
+
+[*.py]
+max_line_length = 120
diff --git a/explorer/apps.py b/explorer/apps.py
index 45b33227..eaf7bee5 100644
--- a/explorer/apps.py
+++ b/explorer/apps.py
@@ -1,7 +1,7 @@
 from django.apps import AppConfig
 from django.core.exceptions import ImproperlyConfigured
 from django.db import connections as djcs
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 
 
 class ExplorerAppConfig(AppConfig):
diff --git a/explorer/models.py b/explorer/models.py
index c4a1de39..c1375094 100644
--- a/explorer/models.py
+++ b/explorer/models.py
@@ -4,7 +4,7 @@
 from django.conf import settings
 from django.db import models, DatabaseError, transaction
 from django.urls import reverse
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 
 from explorer import app_settings
 from explorer.utils import (
diff --git a/requirements/base.txt b/requirements/base.txt
index cecf16c3..c3fe190a 100644
--- a/requirements/base.txt
+++ b/requirements/base.txt
@@ -1,2 +1,3 @@
 Django>=2.2.14
 sqlparse>=0.4.0
+coverage


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 886f90d9..83d60e94 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -20,17 +20,19 @@ jobs:
         ]
 
     steps:
-    - uses: actions/checkout@v1
-    - name: Set up Python ${{ matrix.python-version }}
-      uses: actions/setup-python@v2
-      with:
-        python-version: ${{ matrix.python-version }}
-    - name: Install dependencies
-      run: |
-        python -m pip install --upgrade pip
-        pip install -r requirements/optional.txt
-        pip install -r requirements/${{ matrix.requirements-file }}
-        python setup.py install
+      - uses: actions/checkout@v1
+      - name: Set up Python ${{ matrix.python-version }}
+        uses: actions/setup-python@v2
+        with:
+          python-version: ${{ matrix.python-version }}
+      - name: Install dependencies
+        run: |
+          python -m pip install --upgrade pip
+          pip install -r requirements/optional.txt
+          pip install -r requirements/${{ matrix.requirements-file }}
+          python setup.py install
 
-    - name: Run tests
-      run: python manage.py test
+      - name: Run tests
+        run: |
+          coverage run --source=explorer manage.py test
+          coverage report