Repository: equinor/resfo (language: python)

Issue:
Fix deprecation warning
This PR removes deprecated call to `pkg_resources.get_distribution` with `importlib.metadata.version`.

Note: `__name__` = "ecl_data_io.version", so that can't be used without some stringprocessing e.g.
`version(__name__.split(".")[0])`



Pytest-warnings in my project inb4 changing this^
```
pkg_resources\__init__.py:121: DeprecationWarning: pkg_resources is deprecated as an API      
    warnings.warn("pkg_resources is deprecated as an API", DeprecationWarning)

pkg_resources\__init__.py:2870: DeprecationWarning: Deprecated call to `pkg_resources.declare_
namespace('mpl_toolkits')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

```


Discussion / hints:
Seems to fail with python 3.7, however we are about to drop support for python 3.7 so that should be fine. I'll update the setup with python 3.7 support dropped, and then we can merge this.


Fix patch:
diff --git a/pyproject.toml b/pyproject.toml
index 0df1d2f..edb91f2 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -10,7 +10,6 @@ classifiers=[
     "Development Status :: 1 - Planning",
     "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
     "Programming Language :: Python",
-    "Programming Language :: Python :: 3.7",
     "Programming Language :: Python :: 3.8",
     "Programming Language :: Python :: 3.9",
     "Programming Language :: Python :: 3.10",
diff --git a/tox.ini b/tox.ini
index 8ed1b1c..e00f18e 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,11 +1,11 @@
 [tox]
 isolated_build = True
 envlist =
-    py{37,38,39,310}
+    py{38,39,310}
     style
     docs
 
-[testenv:py{37,38,39,310}]
+[testenv:py{38,39,310}]
 deps =
     .[dev]
 commands = python -m pytest
@@ -29,6 +29,5 @@ addopts =
 
 [gh-actions]
 python =
-    3.7: py37
     3.8: py38
     3.9: py39


Test patch:
diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml
index deee271..184ba42 100644
--- a/.github/workflows/testing.yml
+++ b/.github/workflows/testing.yml
@@ -8,7 +8,7 @@ jobs:
     runs-on: "ubuntu-latest"
     strategy:
       matrix:
-        python-version: ["3.7", "3.8", "3.9", "3.10"]
+        python-version: ["3.8", "3.9", "3.10"]
 
     steps:
       - uses: actions/checkout@v1