diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml index 15791da38..c0e16a6c9 100644 --- a/.github/workflows/black.yml +++ b/.github/workflows/black.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: 3.7 + python-version: 3.8 cache: 'pip' cache-dependency-path: '.github/workflows/black.yml' - run: pip install black==22.3.0 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index df540aed4..cefecd2bb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -92,7 +92,7 @@ jobs: fail-fast: false matrix: python-version: - - 3.7 + - 3.8 action: - TEST=Dataset - TEST=fork_exec @@ -158,7 +158,7 @@ jobs: fail-fast: false matrix: python-version: - - 3.7 + - 3.8 tf-version: - 2.10.0 action: @@ -174,23 +174,11 @@ jobs: - TEST=TFUtil - TEST=tools include: - - action: TEST=TFUtil - python-version: 3.7 - tf-version: 1.15.3 - action: TEST=TFEngine - python-version: 3.7 - tf-version: 1.15.3 - - action: TEST=TFEngine - python-version: 3.7 + python-version: 3.8 tf-version: 2.3.0 - - action: TEST=TFNativeOp - python-version: 3.7 - tf-version: 1.14.0 - - action: TEST=TFNetworkSigProcLayer - python-version: 3.7 - tf-version: 1.15.3 - action: TEST=demos RETURNN_DISABLE_TORCH=1 - python-version: 3.7 + python-version: 3.8 tf-version: 2.3.0 steps: @@ -221,7 +209,7 @@ jobs: pip install --user pytest - if [[ "${{matrix.tf-version}}" == 2.[0123].* || "${{matrix.tf-version}}" == 1.* ]]; then + if [[ "${{matrix.tf-version}}" == 2.[0123].* ]]; then # Older TF needs older NumPy version. # https://github.com/rwth-i6/returnn/pull/1160#issuecomment-1284537803 pip install --user numpy==1.19.5 @@ -358,7 +346,7 @@ jobs: include: # Some selected tests (but not all) with some other versions. - action: TEST=rf_base - python-version: 3.7 + python-version: 3.8 torch-version: 1.13.1 tf-version: 2.10.0 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 439117a59..f144bb229 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/setup-python@v5 with: - python-version: 3.7 + python-version: 3.8 - name: Install Python deps run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index c312078f8..35add63ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ or any changes which could potentially break or change the behavior of existing This is intentionally kept short. For a full change log, just see the Git log. +## 2024-12-13: Bump min Python version from 3.7 to 3.8 ([issue #1326](https://github.com/rwth-i6/returnn/issues/1326)) + +This also drops support for TF 1.x. + ## 2024-06-07: `VariableDataset` Custom subdataset per subepoch based on user-provided function. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b9699abca..f9936e237 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,7 +29,7 @@ General rules when contributing to the code of RETURNN: and in general to use newer TF features (even maybe TF >=2), as long as your new feature (new layer or so) is just optional. For older TF support, `TFCompat.py` might be helpful. (See code for examples.) -* We support Python >=3.7 ([discussion](https://github.com/rwth-i6/returnn/issues/487)). +* We support Python >=3.8 ([discussion](https://github.com/rwth-i6/returnn/issues/1326)). About new features: diff --git a/README.rst b/README.rst index 4793b3fc0..e6463de13 100644 --- a/README.rst +++ b/README.rst @@ -72,3 +72,15 @@ Questions can also be asked on .. image:: https://github.com/rwth-i6/returnn/workflows/CI/badge.svg :target: https://github.com/rwth-i6/returnn/actions + +Dependencies +============ + +pip dependencies are listed in ``requirements.txt`` and ``requirements-dev``, +although some parts of the code may require additional dependencies (e.g. ``librosa``, ``resampy``) on-demand. + +RETURNN supports Python >= 3.8. Bumps to the minimum Python version are listed in `CHANGELOG.md `__. + +TensorFlow-based setups require TensorFlow >= 2.2. + +PyTorch-based setups require Torch >= 1.0. diff --git a/pyproject.toml b/pyproject.toml index a14bd4aae..14c8c02ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.black] line-length = 120 -target-version = ["py37"] # https://github.com/rwth-i6/returnn/issues/487 +target-version = ["py38"] # https://github.com/rwth-i6/returnn/issues/1326 extend-exclude = ''' /( # All Git submodules, see .gitmodules. diff --git a/tests/PyCharm.idea/inspectionProfiles/Project_Default.xml b/tests/PyCharm.idea/inspectionProfiles/Project_Default.xml index 88cda7840..6be6cae45 100644 --- a/tests/PyCharm.idea/inspectionProfiles/Project_Default.xml +++ b/tests/PyCharm.idea/inspectionProfiles/Project_Default.xml @@ -4,10 +4,9 @@ diff --git a/tests/test_Log.py b/tests/test_Log.py index 68b987f30..2f8163ec0 100644 --- a/tests/test_Log.py +++ b/tests/test_Log.py @@ -52,9 +52,12 @@ def filter_out(ls): i = 0 while i < len(ls): s = ls[i] - if "tensorflow/core/" in s or "tensorflow/stream_executor/" in s: # some TF warnings + if any(f"{l} tensorflow/" in s for l in "IWE"): # some TF warnings i += 1 continue + elif "SyntaxWarning" in s: + i += 2 + continue # RuntimeWarning|FutureWarning are warnings and they include the code-line in the next output line if i + 1 < len(ls) and ls[i + 1].startswith(" "): if re.match(".*:\\d+: RuntimeWarning: numpy.*", s) or re.match(".*:\\d+: FutureWarning: .*", s):