🐍 Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
drop python 3.7 support (#2400)
João Gustavo A. Amorim642f45cbe750
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfileindex 9c3a2b9a0..187396182 100644--- a/.devcontainer/Dockerfile+++ b/.devcontainer/Dockerfile@@ -1,6 +1,6 @@# See here for image contents: https://github.com/microsoft/vscode-dev-containers/blob/main/containers/python-3/.devcontainer/base.Dockerfile-# [Choice] Python version: 3, 3.9, 3.8, 3.7+# [Choice] Python version: 3, 3.10, 3.9, 3.8ARG VARIANT="3.8"FROM mcr.microsoft.com/vscode/devcontainers/python:${VARIANT}diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.jsonindex acd1f3eb1..e4aa45a28 100644--- a/.devcontainer/devcontainer.json+++ b/.devcontainer/devcontainer.json@@ -4,7 +4,7 @@"dockerfile": "Dockerfile","context": "..","args": {- // Update 'VARIANT' to pick a Python version: 3, 3.7, 3.8, 3.9, 3.10+ // Update 'VARIANT' to pick a Python version: 3, 3.8, 3.9, 3.10"VARIANT": "3.8",// Options"INSTALL_NODE": "true",diff --git a/.github/actions_info.md b/.github/actions_info.mdindex 845af7c8d..da969bd0a 100644--- a/.github/actions_info.md+++ b/.github/actions_info.md@@ -33,7 +33,7 @@ Use the actions:Has the inputs:- `os`: (string, default: `ubuntu-latest`) the OS name same as supported by [gha](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#choosing-github-hosted-runners).-- `python-version`: (json list of strings, default: `'["3.7"]'`) a string with+- `python-version`: (json list of strings, default: `'["3.8"]'`) a string withformat of a json list within strings for each python version desired.- `pytorch-version`: (json list of strings, default: `'["1.9.1"]'`) a stringwith format of a json list within strings for each pytorch version desired.diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.ymlindex 148910e92..991f08c29 100644--- a/.github/workflows/docs.yml+++ b/.github/workflows/docs.yml@@ -20,7 +20,7 @@ jobs:uses: conda-incubator/setup-miniconda@v2with:auto-update-conda: true- python-version: 3.7+ python-version: 3.8- name: Install dependenciesshell: bash -l {0}run: |@@ -40,7 +40,7 @@ jobs:uses: conda-incubator/setup-miniconda@v2with:auto-update-conda: true- python-version: 3.7+ python-version: 3.8- name: Install dependenciesshell: bash -l {0}run: |diff --git a/.github/workflows/pypi-release.yml b/.github/workflows/pypi-release.ymlindex da94892f2..390b6fab1 100644--- a/.github/workflows/pypi-release.yml+++ b/.github/workflows/pypi-release.yml@@ -14,7 +14,7 @@ jobs:- uses: actions/checkout@master- uses: actions/setup-python@v2with:- python-version: 3.7+ python-version: 3.8- name: Install dependenciesrun: python -m pip install --user --upgrade setuptools build@@ -54,7 +54,7 @@ jobs:- uses: actions/checkout@master- uses: actions/setup-python@v2with:- python-version: 3.7+ python-version: 3.8- uses: actions/download-artifact@v2with:name: pypi-packages-${{ github.sha }}diff --git a/.github/workflows/python_package.yml b/.github/workflows/python_package.ymlindex 6adedb23a..9eb3e8fc3 100644--- a/.github/workflows/python_package.yml+++ b/.github/workflows/python_package.yml@@ -10,7 +10,7 @@ jobs:strategy:matrix:os: [ubuntu-latest, macos-latest, windows-latest]- python-version: ['3.7', '3.8', '3.9', '3.10']+ python-version: ['3.8', '3.9', '3.10']steps:- name: Checkout korniadiff --git a/.github/workflows/scheduled_test_cpu_half.yml b/.github/workflows/scheduled_test_cpu_half.ymlindex a5c0b108a..6ae850bb8 100644--- a/.github/workflows/scheduled_test_cpu_half.yml+++ b/.github/workflows/scheduled_test_cpu_half.yml@@ -20,6 +20,6 @@ jobs:uses: ./.github/workflows/tests.ymlwith:os: ${{ matrix.os }}- python-version: '["3.8", , "3.10"]' # "3.7", "3.9"+ python-version: '["3.8", , "3.10"]' # "3.9"pytorch-version: '["2.0.0"]' # '["1.9.1", "1.10.2", "1.11.0", "1.12.1", "1.13.1"]'pytorch-dtype: 'float16'diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.ymlindex 93962996f..5b8d95af7 100644--- a/.github/workflows/tests.yml+++ b/.github/workflows/tests.yml@@ -4,7 +4,7 @@ on:python-version:required: falsetype: string- default: '["3.7"]'+ default: '["3.8"]'pytorch-version:required: falsetype: stringdiff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 87979b8d6..6a291dde0 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -225,7 +225,7 @@ maintainable.assert x.shape == (batch_size, 2, 3)```-- We give support to static type checker for Python >= 3.7+- We give support to static type checker for Python >= 3.8- Please, read[MyPy cheatsheet](https://mypy.readthedocs.io/en/stable/cheat_sheet_py3.html#type-hints-cheat-sheet-python-3) fordiff --git a/docker/tpu-tests/Dockerfile b/docker/tpu-tests/Dockerfileindex 576f901a3..430b6e004 100644--- a/docker/tpu-tests/Dockerfile+++ b/docker/tpu-tests/Dockerfile@@ -3,7 +3,7 @@ FROM google/cloud-sdk:slim# Build args.ARG GITHUB_REF=refs/heads/master-ARG PYTHON_VERSION=3.7+ARG PYTHON_VERSION=3.8ARG PYTORCH_VERSION=1.8diff --git a/kornia/feature/defmo.py b/kornia/feature/defmo.pyindex 90ef3a96a..f376f8e32 100644--- a/kornia/feature/defmo.py+++ b/kornia/feature/defmo.py@@ -246,9 +246,7 @@ class RenderingDeFMO(Module):renders = []for ki in range(times.shape[1]):t_tensor = (- # TODO: replace by after deprecate pytorch 1.6- # times[list(range(times.shape[0])), ki]- times[[x for x in range(times.shape[0])], ki] # skipcq: PYL-R1721+ times[list(range(times.shape[0])), ki].unsqueeze(-1).unsqueeze(-1).unsqueeze(-1)diff --git a/kornia/feature/mkd.py b/kornia/feature/mkd.pyindex bf6efe50e..5de7e384d 100644--- a/kornia/feature/mkd.py+++ b/kornia/feature/mkd.py@@ -143,9 +143,10 @@ class VonMisesKernel(nn.Module):if not len(x.shape) == 4 or x.shape[1] != 1:raise ValueError(f"Invalid input shape, we expect Bx1xHxW. Got: {x.shape}")- # TODO: unify the two lines below when pytorch 1.6 support is dropped- emb0: Tensor = torch.jit.annotate(Tensor, self.emb0)- emb0 = emb0.to(x).repeat(x.size(0), 1, 1, 1)+ if not isinstance(self.emb0, Tensor):+ raise TypeError(f"Emb0 type is not a Tensor. Got {type(x)}")++ emb0 = self.emb0.to(x).repeat(x.size(0), 1, 1, 1)frange = self.frange.to(x) * xemb1 = torch.cos(frange)emb2 = torch.sin(frange)diff --git a/pyproject.toml b/pyproject.tomlindex 40e34f63d..180055926 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -8,7 +8,7 @@ keywords = []license = {text = "Apache-2.0"}authors = [{name = "Edgar Riba", email = "[email protected]"}]-requires-python = ">=3.7"+requires-python = ">=3.8"classifiers = ["Development Status :: 4 - Beta","Environment :: Console",@@ -21,7 +21,6 @@ classifiers = ["Natural Language :: English","Operating System :: OS Independent","Programming Language :: Python :: 3 :: Only",- "Programming Language :: Python :: 3.7","Programming Language :: Python :: 3.8","Programming Language :: Python :: 3.9","Programming Language :: Python :: 3.10",diff --git a/readthedocs.yml b/readthedocs.ymlindex 64a2822ab..567f3ad4a 100644--- a/readthedocs.yml+++ b/readthedocs.yml@@ -1,7 +1,7 @@version: 2python:- version: 3.7+ version: 3.10install:- method: pippath: .