prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Ray is incompatible with pydantic>=2.0
  We should pin `pydantic<2.0` to workaround the issues on Ray side.
  
  
  Example [from](https://github.com/modin-project/modin/actions/runs/5425526005/jobs/9866377841):
  ```bash
    File "/usr/share/miniconda/envs/modin/lib/python3.8/site-packages/ray/util/state/__init__.py", line 1, in <module>
      from ray.util.state.api import (
    File "/usr/share/miniconda/envs/modin/lib/python3.8/site-packages/ray/util/state/api.py", line 17, in <module>
      from ray.util.state.common import (
    File "/usr/share/miniconda/envs/modin/lib/python3.8/site-packages/ray/util/state/common.py", line 120, in <module>
      @dataclass(init=True)
    File "/usr/share/miniconda/envs/modin/lib/python3.8/site-packages/pydantic/dataclasses.py", line 139, in dataclass
      assert init is False, 'pydantic.dataclasses.dataclass only supports init=False'
  AssertionError: pydantic.dataclasses.dataclass only supports init=False
  ```
  
  </issue>
  <code>
  [start of setup.py]
  1 from setuptools import setup, find_packages
  2 import versioneer
  3 
  4 with open("README.md", "r", encoding="utf-8") as fh:
  5     long_description = fh.read()
  6 
  7 dask_deps = ["dask>=2.22.0", "distributed>=2.22.0"]
  8 # ray==2.5.0 broken: https://github.com/conda-forge/ray-packages-feedstock/issues/100
  9 ray_deps = ["ray[default]>=1.13.0,!=2.5.0", "pyarrow"]
  10 unidist_deps = ["unidist[mpi]>=0.2.1"]
  11 remote_deps = ["rpyc==4.1.5", "cloudpickle", "boto3"]
  12 spreadsheet_deps = ["modin-spreadsheet>=0.1.0"]
  13 sql_deps = ["dfsql>=0.4.2", "pyparsing<=2.4.7"]
  14 all_deps = dask_deps + ray_deps + unidist_deps + remote_deps + spreadsheet_deps
  15 
  16 # Distribute 'modin-autoimport-pandas.pth' along with binary and source distributions.
  17 # This file provides the "import pandas before Ray init" feature if specific
  18 # environment variable is set (see https://github.com/modin-project/modin/issues/4564).
  19 cmdclass = versioneer.get_cmdclass()
  20 extra_files = ["modin-autoimport-pandas.pth"]
  21 
  22 
  23 class AddPthFileBuild(cmdclass["build_py"]):
  24     def _get_data_files(self):
  25         return (super()._get_data_files() or []) + [
  26             (".", ".", self.build_lib, extra_files)
  27         ]
  28 
  29 
  30 class AddPthFileSDist(cmdclass["sdist"]):
  31     def make_distribution(self):
  32         self.filelist.extend(extra_files)
  33         return super().make_distribution()
  34 
  35 
  36 cmdclass["build_py"] = AddPthFileBuild
  37 cmdclass["sdist"] = AddPthFileSDist
  38 
  39 setup(
  40     name="modin",
  41     version=versioneer.get_version(),
  42     cmdclass=cmdclass,
  43     description="Modin: Make your pandas code run faster by changing one line of code.",
  44     packages=find_packages(exclude=["scripts", "scripts.*"]),
  45     include_package_data=True,
  46     license="Apache 2",
  47     url="https://github.com/modin-project/modin",
  48     long_description=long_description,
  49     long_description_content_type="text/markdown",
  50     install_requires=[
  51         "pandas>=2,<2.1",
  52         "packaging",
  53         "numpy>=1.18.5",
  54         "fsspec",
  55         "psutil",
  56     ],
  57     extras_require={
  58         # can be installed by pip install modin[dask]
  59         "dask": dask_deps,
  60         "ray": ray_deps,
  61         "unidist": unidist_deps,
  62         "remote": remote_deps,
  63         "spreadsheet": spreadsheet_deps,
  64         "sql": sql_deps,
  65         "all": all_deps,
  66     },
  67     python_requires=">=3.8",
  68 )
  69
  [end of setup.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/setup.py b/setup.py
  --- a/setup.py
  +++ b/setup.py
  @@ -6,7 +6,8 @@
   
   dask_deps = ["dask>=2.22.0", "distributed>=2.22.0"]
   # ray==2.5.0 broken: https://github.com/conda-forge/ray-packages-feedstock/issues/100
  -ray_deps = ["ray[default]>=1.13.0,!=2.5.0", "pyarrow"]
  +# pydantic<2: https://github.com/modin-project/modin/issues/6336
  +ray_deps = ["ray[default]>=1.13.0,!=2.5.0", "pyarrow", "pydantic<2"]
   unidist_deps = ["unidist[mpi]>=0.2.1"]
   remote_deps = ["rpyc==4.1.5", "cloudpickle", "boto3"]
   spreadsheet_deps = ["modin-spreadsheet>=0.1.0"]
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -6,7 +6,8 @@\n \n dask_deps = [\"dask>=2.22.0\", \"distributed>=2.22.0\"]\n # ray==2.5.0 broken: https://github.com/conda-forge/ray-packages-feedstock/issues/100\n-ray_deps = [\"ray[default]>=1.13.0,!=2.5.0\", \"pyarrow\"]\n+# pydantic<2: https://github.com/modin-project/modin/issues/6336\n+ray_deps = [\"ray[default]>=1.13.0,!=2.5.0\", \"pyarrow\", \"pydantic<2\"]\n unidist_deps = [\"unidist[mpi]>=0.2.1\"]\n remote_deps = [\"rpyc==4.1.5\", \"cloudpickle\", \"boto3\"]\n spreadsheet_deps = [\"modin-spreadsheet>=0.1.0\"]\n", "issue": "Ray is incompatible with pydantic>=2.0\nWe should pin `pydantic<2.0` to workaround the issues on Ray side.\r\n\r\n\r\nExample [from](https://github.com/modin-project/modin/actions/runs/5425526005/jobs/9866377841):\r\n```bash\r\n  File \"/usr/share/miniconda/envs/modin/lib/python3.8/site-packages/ray/util/state/__init__.py\", line 1, in <module>\r\n    from ray.util.state.api import (\r\n  File \"/usr/share/miniconda/envs/modin/lib/python3.8/site-packages/ray/util/state/api.py\", line 17, in <module>\r\n    from ray.util.state.common import (\r\n  File \"/usr/share/miniconda/envs/modin/lib/python3.8/site-packages/ray/util/state/common.py\", line 120, in <module>\r\n    @dataclass(init=True)\r\n  File \"/usr/share/miniconda/envs/modin/lib/python3.8/site-packages/pydantic/dataclasses.py\", line 139, in dataclass\r\n    assert init is False, 'pydantic.dataclasses.dataclass only supports init=False'\r\nAssertionError: pydantic.dataclasses.dataclass only supports init=False\r\n```\n", "before_files": [{"content": "from setuptools import setup, find_packages\nimport versioneer\n\nwith open(\"README.md\", \"r\", encoding=\"utf-8\") as fh:\n    long_description = fh.read()\n\ndask_deps = [\"dask>=2.22.0\", \"distributed>=2.22.0\"]\n# ray==2.5.0 broken: https://github.com/conda-forge/ray-packages-feedstock/issues/100\nray_deps = [\"ray[default]>=1.13.0,!=2.5.0\", \"pyarrow\"]\nunidist_deps = [\"unidist[mpi]>=0.2.1\"]\nremote_deps = [\"rpyc==4.1.5\", \"cloudpickle\", \"boto3\"]\nspreadsheet_deps = [\"modin-spreadsheet>=0.1.0\"]\nsql_deps = [\"dfsql>=0.4.2\", \"pyparsing<=2.4.7\"]\nall_deps = dask_deps + ray_deps + unidist_deps + remote_deps + spreadsheet_deps\n\n# Distribute 'modin-autoimport-pandas.pth' along with binary and source distributions.\n# This file provides the \"import pandas before Ray init\" feature if specific\n# environment variable is set (see https://github.com/modin-project/modin/issues/4564).\ncmdclass = versioneer.get_cmdclass()\nextra_files = [\"modin-autoimport-pandas.pth\"]\n\n\nclass AddPthFileBuild(cmdclass[\"build_py\"]):\n    def _get_data_files(self):\n        return (super()._get_data_files() or []) + [\n            (\".\", \".\", self.build_lib, extra_files)\n        ]\n\n\nclass AddPthFileSDist(cmdclass[\"sdist\"]):\n    def make_distribution(self):\n        self.filelist.extend(extra_files)\n        return super().make_distribution()\n\n\ncmdclass[\"build_py\"] = AddPthFileBuild\ncmdclass[\"sdist\"] = AddPthFileSDist\n\nsetup(\n    name=\"modin\",\n    version=versioneer.get_version(),\n    cmdclass=cmdclass,\n    description=\"Modin: Make your pandas code run faster by changing one line of code.\",\n    packages=find_packages(exclude=[\"scripts\", \"scripts.*\"]),\n    include_package_data=True,\n    license=\"Apache 2\",\n    url=\"https://github.com/modin-project/modin\",\n    long_description=long_description,\n    long_description_content_type=\"text/markdown\",\n    install_requires=[\n        \"pandas>=2,<2.1\",\n        \"packaging\",\n        \"numpy>=1.18.5\",\n        \"fsspec\",\n        \"psutil\",\n    ],\n    extras_require={\n        # can be installed by pip install modin[dask]\n        \"dask\": dask_deps,\n        \"ray\": ray_deps,\n        \"unidist\": unidist_deps,\n        \"remote\": remote_deps,\n        \"spreadsheet\": spreadsheet_deps,\n        \"sql\": sql_deps,\n        \"all\": all_deps,\n    },\n    python_requires=\">=3.8\",\n)\n", "path": "setup.py"}]}