🐍 Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
drop python 3.6 (#1971)
João Gustavo A. Amorime040f6aac3b8
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfileindex 33c4081ce..9c3a2b9a0 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, 3.6+# [Choice] Python version: 3, 3.9, 3.8, 3.7ARG VARIANT="3.8"FROM mcr.microsoft.com/vscode/devcontainers/python:${VARIANT}diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.jsonindex 6490d3f58..acd1f3eb1 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.6, 3.7, 3.8, 3.9, 3.10+ // Update 'VARIANT' to pick a Python version: 3, 3.7, 3.8, 3.9, 3.10"VARIANT": "3.8",// Options"INSTALL_NODE": "true",diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.ymlindex f25bb36a8..c7eb85186 100644--- a/.github/workflows/docs.yml+++ b/.github/workflows/docs.yml@@ -18,7 +18,7 @@ jobs:uses: conda-incubator/setup-miniconda@v2with:auto-update-conda: true- python-version: 3.6+ python-version: 3.7- name: Install dependenciesshell: bash -l {0}run: |diff --git a/.github/workflows/python_package.yml b/.github/workflows/python_package.ymlindex a5e85ffed..97d968bab 100644--- a/.github/workflows/python_package.yml+++ b/.github/workflows/python_package.yml@@ -12,7 +12,7 @@ jobs:# You can use PyPy versions in python-version.# For example, pypy2 and pypy3os: [ubuntu-latest, macos-latest, windows-latest]- python-version: [3.6, 3.7, 3.8]+ python-version: [3.7, 3.8]steps:- uses: actions/checkout@v2diff --git a/.github/workflows/tests_nightly.yml b/.github/workflows/tests_nightly.ymlindex 2c2394840..5dcea9c45 100644--- a/.github/workflows/tests_nightly.yml+++ b/.github/workflows/tests_nightly.yml@@ -15,7 +15,7 @@ jobs:fail-fast: falsematrix:os: [ubuntu-latest, macos-latest, windows-latest]- python-version: [3.6, 3.7, 3.8]+ python-version: [3.7, 3.8]steps:- uses: actions/checkout@v2- name: Setup conda dependenciesdiff --git a/.pre-commit-config.yaml b/.pre-commit-config.yamlindex ab737b7f1..14f82df42 100644--- a/.pre-commit-config.yaml+++ b/.pre-commit-config.yaml@@ -1,6 +1,3 @@-default_language_version:- python: python3.8-ci:autofix_prs: trueautoupdate_commit_msg: '[pre-commit.ci] pre-commit suggestions'@@ -51,7 +48,7 @@ repos:rev: v3.2.0hooks:- id: pyupgrade- args: [--py36-plus]+ args: [--py37-plus]- repo: https://github.com/PyCQA/banditrev: 1.7.4diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rstindex 3220de932..9bea25de4 100644--- a/CONTRIBUTING.rst+++ b/CONTRIBUTING.rst@@ -132,7 +132,7 @@ This section provides general guidance for developing code for the project. Thex = x.to(torch.device(device_type))assert x.shape == (batch_size, 2, 3), x.shape-- We give support to static type checker for Python >= 3.6+- We give support to static type checker for Python >= 3.7- Please, read `MyPy cheatsheet <https://mypy.readthedocs.io/en/stable/cheat_sheet_py3.html#type-hints-cheat-sheet-python-3>`_ for Python 3.- It is recommended to use typing inside the function, when it would increase readability.diff --git a/docker/tpu-tests/Dockerfile b/docker/tpu-tests/Dockerfileindex 5b245e07c..576f901a3 100644--- a/docker/tpu-tests/Dockerfile+++ b/docker/tpu-tests/Dockerfile@@ -3,11 +3,9 @@ FROM google/cloud-sdk:slim# Build args.ARG GITHUB_REF=refs/heads/master-# TODO: This Dockerfile installs pytorch/xla 3.6 wheels. There are also 3.7-# wheels available; see below.-ARG PYTHON_VERSION=3.6+ARG PYTHON_VERSION=3.7-ARG PYTORCH_VERSION=1.7+ARG PYTORCH_VERSION=1.8RUN apt-get update && apt-get install -y --no-install-recommends \build-essential \diff --git a/kornia/utils/_compat.py b/kornia/utils/_compat.pyindex dad7add98..b92736498 100644--- a/kornia/utils/_compat.py+++ b/kornia/utils/_compat.py@@ -33,12 +33,9 @@ def torch_version_ge(major: int, minor: int, patch: int) -> bool:if version.parse(torch_version()) > version.parse("1.7.1"):- # TODO: remove the type: ignore once Python 3.6 is deprecated.- # It turns out that Pytorch has no attribute `torch.linalg` for- # Python 3.6 / PyTorch 1.7.0, 1.7.1- from torch.linalg import qr as linalg_qr # type: ignore+ from torch.linalg import qr as linalg_qrelse:- from torch import qr as linalg_qr # type: ignore # noqa: F401+ from torch import qr as linalg_qr # noqa: F401if torch_version_ge(1, 10, 0):diff --git a/kornia/x/utils.py b/kornia/x/utils.pyindex 0b9d77d7b..958b1d153 100644--- a/kornia/x/utils.py+++ b/kornia/x/utils.py@@ -1,5 +1,4 @@-# TODO: remove the type: ignore in below after deprecating python 3.6-from dataclasses import dataclass, field # type: ignore+from dataclasses import dataclass, fieldfrom enum import Enumfrom typing import Dictdiff --git a/setup.py b/setup.pyindex f8aba1c98..7a36fe125 100644--- a/setup.py+++ b/setup.py@@ -1,11 +1,11 @@# Welcome to the Kornia setup.py.import sys-# Make sure that kornia is running on Python 3.6.0 or later+# Make sure that kornia is running on Python 3.7.0 or later# (to avoid running into this bug: https://bugs.python.org/issue29246)-if sys.version_info < (3, 6, 0):- raise RuntimeError("Kornia requires Python 3.6.0 or later.")+if sys.version_info < (3, 7, 0):+ raise RuntimeError("Kornia requires Python 3.7.0 or later.")from setuptools import setup