Repository: lhotse-speech/lhotse

Issue:
[feedback requested] Dropping support for Python 3.6
> Python 3.6.0
> Release Date: Dec. 23, 2016
> Note: The release you are looking at is Python 3.6.0, the initial feature release for the legacy 3.6 series which has now reached end-of-life and is no longer supported. See the [downloads page](https://www.python.org/downloads/) for currently supported versions of Python. The final source-only security fix release for 3.6 was [3.6.15](https://www.python.org/downloads/release/python-3615/) and the final bugfix release was [3.6.8](https://www.python.org/downloads/release/python-368/).

Source: https://www.python.org/downloads/release/python-360/

It would make my life a bit simpler (and less work in CI) if we drop the support for Python 3.6 in Lhotse 1.8 and onwards. Before doing that, I'd like to see if anybody in the community really needs Python 3.6 to be supported for some reason.


Discussion:

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -41,6 +41,7 @@
 #             ./osssssssssssssssssssssssssssssssssssssssssssssssssssssssssss/-`
 #                 .-:://++++++++++++++++++++++++++++++++++++++++++++///:-.`
 import os
+import sys
 from pathlib import Path
 from subprocess import DEVNULL, PIPE, run
 
@@ -57,6 +58,22 @@
 IS_DEV_VERSION = True  # False = public release, True = otherwise
 
 
+if sys.version_info < (3,):
+    # fmt: off
+    print(
+        "Python 2 has reached end-of-life and is no longer supported by lhotse."
+    )
+    # fmt: on
+    sys.exit(-1)
+
+if sys.version_info < (3, 7):
+    print(
+        "Python 3.6 has reached end-of-life on December 31st, 2021 "
+        "and is no longer supported by lhotse."
+    )
+    sys.exit(-1)
+
+
 def discover_lhotse_version() -> str:
     """
     Scans Lhotse source code to determine the current version.
@@ -202,7 +219,7 @@ def mark_lhotse_version(version: str) -> None:
 setup(
     name="lhotse",
     version=LHOTSE_VERSION,
-    python_requires=">=3.6.0",
+    python_requires=">=3.7.0",
     description="Data preparation for speech processing models training.",
     author="The Lhotse Development Team",
     author_email="pzelasko@jhu.edu",
@@ -230,7 +247,6 @@ def mark_lhotse_version(version: str) -> None:
     },
     classifiers=[
         "Development Status :: 4 - Beta",
-        "Programming Language :: Python :: 3.6",
         "Programming Language :: Python :: 3.7",
         "Programming Language :: Python :: 3.8",
         "Programming Language :: Python :: 3.9",
@@ -238,6 +254,7 @@ def mark_lhotse_version(version: str) -> None:
         "Intended Audience :: Science/Research",
         "Operating System :: POSIX :: Linux",
         "Operating System :: MacOS :: MacOS X",
+        "Operating System :: Microsoft :: Windows",
         "License :: OSI Approved :: Apache Software License",
         "Topic :: Multimedia :: Sound/Audio :: Speech",
         "Topic :: Scientific/Engineering :: Artificial Intelligence",


Test patch:
diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml
--- a/.github/workflows/unit_tests.yml
+++ b/.github/workflows/unit_tests.yml
@@ -16,8 +16,6 @@ jobs:
     strategy:
       matrix:
         include:
-          - python-version: "3.6"
-            torch-install-cmd: "pip install torch==1.8.2+cpu torchaudio==0.8.2 -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html"
           - python-version: "3.7"
             torch-install-cmd: "pip install torch==1.8.2+cpu torchaudio==0.8.2 -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html"
           - python-version: "3.8"