Repository: open-telemetry/opentelemetry-python

Issue:
Drop support for 3.7
[More than 6 months have passed since the end of life of 3.7](https://endoflife.date/python). Drop support for 3.7.


Discussion:

Resolving patch:
diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/export/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/export/__init__.py
--- a/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/export/__init__.py
+++ b/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/export/__init__.py
@@ -216,7 +216,6 @@ def __init__(
         self._flush_request = None
         self._log_records = [None] * self._max_export_batch_size
         self._worker_thread.start()
-        # Only available in *nix since py37.
         if hasattr(os, "register_at_fork"):
             os.register_at_fork(
                 after_in_child=self._at_fork_reinit
diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/view.py b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/view.py
--- a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/view.py
+++ b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/view.py
@@ -17,9 +17,6 @@
 from logging import getLogger
 from typing import Optional, Set, Type
 
-# FIXME import from typing when support for 3.7 is removed
-from typing_extensions import final
-
 from opentelemetry.metrics import Instrument
 from opentelemetry.sdk.metrics._internal.aggregation import (
     Aggregation,
@@ -138,7 +135,6 @@ def __init__(
 
     # pylint: disable=too-many-return-statements
     # pylint: disable=too-many-branches
-    @final
     def _match(self, instrument: Instrument) -> bool:
 
         if self._instrument_type is not None:
diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/trace/export/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/trace/export/__init__.py
--- a/opentelemetry-sdk/src/opentelemetry/sdk/trace/export/__init__.py
+++ b/opentelemetry-sdk/src/opentelemetry/sdk/trace/export/__init__.py
@@ -203,7 +203,6 @@ def __init__(
             None
         ] * self.max_export_batch_size  # type: typing.List[typing.Optional[Span]]
         self.worker_thread.start()
-        # Only available in *nix since py37.
         if hasattr(os, "register_at_fork"):
             os.register_at_fork(
                 after_in_child=self._at_fork_reinit


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -23,19 +23,18 @@ jobs:
   build:
     env:
       # We use these variables to convert between tox and GHA version literals
-      py37: 3.7
       py38: 3.8
       py39: 3.9
       py310: "3.10"
       py311: "3.11"
-      pypy3: pypy-3.7
+      pypy3: pypy-3.8
       RUN_MATRIX_COMBINATION: ${{ matrix.python-version }}-${{ matrix.package }}-${{
         matrix.os }}
     runs-on: ${{ matrix.os }}
     strategy:
       fail-fast: false  # ensures the entire test matrix is run, even if one permutation fails
       matrix:
-        python-version: [py37, py38, py39, py310, py311, pypy3]
+        python-version: [py38, py39, py310, py311, pypy3]
         package:
           - "api"
           - "sdk"
@@ -115,17 +114,17 @@ jobs:
       run: tox -e ${{ matrix.tox-environment }}
 
   # Contrib unit test suite in order to ensure changes in core do not break anything in contrib.
-  # We only run contrib unit tests on the oldest supported Python version (3.7) as running the same tests
+  # We only run contrib unit tests on the oldest supported Python version (3.8) as running the same tests
   # on all versions is somewhat redundant.
   contrib-build:
     env:
       # We use these variables to convert between tox and GHA version literals
-      py37: 3.7
+      py38: 3.8
     runs-on: ${{ matrix.os }}
     strategy:
       fail-fast: false  # ensures the entire test matrix is run, even if one permutation fails
       matrix:
-        python-version: [py37]
+        python-version: [py38]
         package:
           - "aiohttp-client"
           - "aiohttp-server"
diff --git a/shim/opentelemetry-opentracing-shim/tests/testbed/README.rst b/shim/opentelemetry-opentracing-shim/tests/testbed/README.rst
--- a/shim/opentelemetry-opentracing-shim/tests/testbed/README.rst
+++ b/shim/opentelemetry-opentracing-shim/tests/testbed/README.rst
@@ -9,7 +9,7 @@ Build and test.
 
 .. code-block:: sh
 
-   tox -e py37-test-opentracing-shim
+   tox -e py311-test-opentracing-shim
 
 Alternatively, due to the organization of the suite, it's possible to run directly the tests using ``py.test``\ :
 
diff --git a/tests/opentelemetry-test-utils/pyproject.toml b/tests/opentelemetry-test-utils/pyproject.toml
--- a/tests/opentelemetry-test-utils/pyproject.toml
+++ b/tests/opentelemetry-test-utils/pyproject.toml
@@ -8,7 +8,7 @@ dynamic = ["version"]
 description = "Test utilities for OpenTelemetry unit tests"
 readme = "README.rst"
 license = "Apache-2.0"
-requires-python = ">=3.7"
+requires-python = ">=3.8"
 authors = [
   { name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
 ]
@@ -18,7 +18,6 @@ classifiers = [
   "License :: OSI Approved :: Apache Software License",
   "Programming Language :: Python",
   "Programming Language :: Python :: 3",
-  "Programming Language :: Python :: 3.7",
   "Programming Language :: Python :: 3.8",
   "Programming Language :: Python :: 3.9",
   "Programming Language :: Python :: 3.10",