prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Cleanup on setup metadata
  _Originally posted by @johnnv1 in https://github.com/kornia/kornia/pull/2225#discussion_r1117693700_
  
  
  -----
  right now I think we have some deadlines in the setup, for example:
  - https://github.com/kornia/kornia/blob/master/setup.py#L16
  - https://github.com/kornia/kornia/blob/master/setup.cfg#L57
  - This isn't used anymore https://github.com/kornia/kornia/tree/master/packaging  
  
  </issue>
  <code>
  [start of kornia/__init__.py]
  1 # NOTE: kornia filters and geometry must go first since are the core of the library
  2 # and by changing the import order you might get into a circular dependencies issue.
  3 from . import filters
  4 from . import geometry
  5 from . import grad_estimator
  6 
  7 # import the other modules for convenience
  8 from . import augmentation, color, contrib, core, enhance, feature, io, losses, metrics, morphology, tracking, utils, x
  9 
  10 # NOTE: we are going to expose to top level very few things
  11 from kornia.constants import pi
  12 from kornia.testing import xla_is_available
  13 from kornia.utils import eye_like, vec_like, create_meshgrid, image_to_tensor, tensor_to_image
  14 
  15 # Version variable
  16 import sys
  17 
  18 if sys.version_info >= (3, 8):  # pragma: >=3.8 cover
  19     import importlib.metadata as importlib_metadata
  20 else:  # pragma: <3.8 cover
  21     import importlib_metadata
  22 
  23 __version__ = importlib_metadata.version('kornia')
  24
  [end of kornia/__init__.py]
  [start of kornia/utils/_compat.py]
  1 from typing import TYPE_CHECKING, Callable, ContextManager, List, Optional, Tuple, TypeVar
  2 
  3 import torch
  4 from torch import Tensor
  5 
  6 from packaging import version
  7 
  8 
  9 def torch_version() -> str:
  10     """Parse the `torch.__version__` variable and removes +cu*/cpu."""
  11     return torch.__version__.split('+')[0]
  12 
  13 
  14 def torch_version_lt(major: int, minor: int, patch: int) -> bool:
  15     _version = version.parse(torch_version())
  16     return _version < version.parse(f"{major}.{minor}.{patch}")
  17 
  18 
  19 def torch_version_le(major: int, minor: int, patch: int) -> bool:
  20     _version = version.parse(torch_version())
  21     return _version <= version.parse(f"{major}.{minor}.{patch}")
  22 
  23 
  24 def torch_version_ge(major: int, minor: int, patch: Optional[int] = None) -> bool:
  25     _version = version.parse(torch_version())
  26     if patch is None:
  27         return _version >= version.parse(f"{major}.{minor}")
  28     else:
  29         return _version >= version.parse(f"{major}.{minor}.{patch}")
  30 
  31 
  32 if TYPE_CHECKING:
  33     # TODO: remove this branch when kornia relies on torch >= 1.10.0
  34     def torch_meshgrid(tensors: List[Tensor], indexing: Optional[str] = None) -> Tuple[Tensor, ...]:
  35         ...
  36 
  37 else:
  38     if torch_version_ge(1, 10, 0):
  39 
  40         def torch_meshgrid(tensors: List[Tensor], indexing: str):
  41             return torch.meshgrid(tensors, indexing=indexing)
  42 
  43     else:
  44         # TODO: remove this branch when kornia relies on torch >= 1.10.0
  45         def torch_meshgrid(tensors: List[Tensor], indexing: str):
  46             return torch.meshgrid(tensors)
  47 
  48 
  49 if TYPE_CHECKING:
  50     # TODO: remove this branch when kornia relies on torch >= 1.10.0
  51     _T = TypeVar('_T')
  52     torch_inference_mode: Callable[..., ContextManager[_T]]
  53 else:
  54     if torch_version_ge(1, 10, 0):
  55         torch_inference_mode = torch.inference_mode
  56     else:
  57         # TODO: remove this branch when kornia relies on torch >= 1.10.0
  58         torch_inference_mode = torch.no_grad
  59
  [end of kornia/utils/_compat.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/kornia/__init__.py b/kornia/__init__.py
  --- a/kornia/__init__.py
  +++ b/kornia/__init__.py
  @@ -13,11 +13,4 @@
   from kornia.utils import eye_like, vec_like, create_meshgrid, image_to_tensor, tensor_to_image
   
   # Version variable
  -import sys
  -
  -if sys.version_info >= (3, 8):  # pragma: >=3.8 cover
  -    import importlib.metadata as importlib_metadata
  -else:  # pragma: <3.8 cover
  -    import importlib_metadata
  -
  -__version__ = importlib_metadata.version('kornia')
  +__version__ = "0.6.11.dev"
  diff --git a/kornia/utils/_compat.py b/kornia/utils/_compat.py
  --- a/kornia/utils/_compat.py
  +++ b/kornia/utils/_compat.py
  @@ -1,9 +1,8 @@
   from typing import TYPE_CHECKING, Callable, ContextManager, List, Optional, Tuple, TypeVar
   
   import torch
  -from torch import Tensor
  -
   from packaging import version
  +from torch import Tensor
   
   
   def torch_version() -> str:
  
verification_info: {"golden_diff": "diff --git a/kornia/__init__.py b/kornia/__init__.py\n--- a/kornia/__init__.py\n+++ b/kornia/__init__.py\n@@ -13,11 +13,4 @@\n from kornia.utils import eye_like, vec_like, create_meshgrid, image_to_tensor, tensor_to_image\n \n # Version variable\n-import sys\n-\n-if sys.version_info >= (3, 8):  # pragma: >=3.8 cover\n-    import importlib.metadata as importlib_metadata\n-else:  # pragma: <3.8 cover\n-    import importlib_metadata\n-\n-__version__ = importlib_metadata.version('kornia')\n+__version__ = \"0.6.11.dev\"\ndiff --git a/kornia/utils/_compat.py b/kornia/utils/_compat.py\n--- a/kornia/utils/_compat.py\n+++ b/kornia/utils/_compat.py\n@@ -1,9 +1,8 @@\n from typing import TYPE_CHECKING, Callable, ContextManager, List, Optional, Tuple, TypeVar\n \n import torch\n-from torch import Tensor\n-\n from packaging import version\n+from torch import Tensor\n \n \n def torch_version() -> str:\n", "issue": "Cleanup on setup metadata\n_Originally posted by @johnnv1 in https://github.com/kornia/kornia/pull/2225#discussion_r1117693700_\r\n\r\n\r\n-----\r\nright now I think we have some deadlines in the setup, for example:\r\n- https://github.com/kornia/kornia/blob/master/setup.py#L16\r\n- https://github.com/kornia/kornia/blob/master/setup.cfg#L57\r\n- This isn't used anymore https://github.com/kornia/kornia/tree/master/packaging  \n", "before_files": [{"content": "# NOTE: kornia filters and geometry must go first since are the core of the library\n# and by changing the import order you might get into a circular dependencies issue.\nfrom . import filters\nfrom . import geometry\nfrom . import grad_estimator\n\n# import the other modules for convenience\nfrom . import augmentation, color, contrib, core, enhance, feature, io, losses, metrics, morphology, tracking, utils, x\n\n# NOTE: we are going to expose to top level very few things\nfrom kornia.constants import pi\nfrom kornia.testing import xla_is_available\nfrom kornia.utils import eye_like, vec_like, create_meshgrid, image_to_tensor, tensor_to_image\n\n# Version variable\nimport sys\n\nif sys.version_info >= (3, 8):  # pragma: >=3.8 cover\n    import importlib.metadata as importlib_metadata\nelse:  # pragma: <3.8 cover\n    import importlib_metadata\n\n__version__ = importlib_metadata.version('kornia')\n", "path": "kornia/__init__.py"}, {"content": "from typing import TYPE_CHECKING, Callable, ContextManager, List, Optional, Tuple, TypeVar\n\nimport torch\nfrom torch import Tensor\n\nfrom packaging import version\n\n\ndef torch_version() -> str:\n    \"\"\"Parse the `torch.__version__` variable and removes +cu*/cpu.\"\"\"\n    return torch.__version__.split('+')[0]\n\n\ndef torch_version_lt(major: int, minor: int, patch: int) -> bool:\n    _version = version.parse(torch_version())\n    return _version < version.parse(f\"{major}.{minor}.{patch}\")\n\n\ndef torch_version_le(major: int, minor: int, patch: int) -> bool:\n    _version = version.parse(torch_version())\n    return _version <= version.parse(f\"{major}.{minor}.{patch}\")\n\n\ndef torch_version_ge(major: int, minor: int, patch: Optional[int] = None) -> bool:\n    _version = version.parse(torch_version())\n    if patch is None:\n        return _version >= version.parse(f\"{major}.{minor}\")\n    else:\n        return _version >= version.parse(f\"{major}.{minor}.{patch}\")\n\n\nif TYPE_CHECKING:\n    # TODO: remove this branch when kornia relies on torch >= 1.10.0\n    def torch_meshgrid(tensors: List[Tensor], indexing: Optional[str] = None) -> Tuple[Tensor, ...]:\n        ...\n\nelse:\n    if torch_version_ge(1, 10, 0):\n\n        def torch_meshgrid(tensors: List[Tensor], indexing: str):\n            return torch.meshgrid(tensors, indexing=indexing)\n\n    else:\n        # TODO: remove this branch when kornia relies on torch >= 1.10.0\n        def torch_meshgrid(tensors: List[Tensor], indexing: str):\n            return torch.meshgrid(tensors)\n\n\nif TYPE_CHECKING:\n    # TODO: remove this branch when kornia relies on torch >= 1.10.0\n    _T = TypeVar('_T')\n    torch_inference_mode: Callable[..., ContextManager[_T]]\nelse:\n    if torch_version_ge(1, 10, 0):\n        torch_inference_mode = torch.inference_mode\n    else:\n        # TODO: remove this branch when kornia relies on torch >= 1.10.0\n        torch_inference_mode = torch.no_grad\n", "path": "kornia/utils/_compat.py"}]}