We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bump fastavro version
**Is your feature request related to a problem? Please describe.**
The version of Fastavro that we're using is kinda old and may be buggy soon. It's also causing some version conflicts with packages that have already upgraded to the newer (1.xx) versions.

**Describe the solution you'd like**
Bump Fastavro to 1.x.x


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `sdk/python/setup.py`
Content:
```
1 # Copyright 2019 The Feast Authors
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     https://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 import glob
15 import os
16 import re
17 import subprocess
18 
19 from distutils.cmd import Command
20 from setuptools import find_packages
21 
22 try:
23     from setuptools import setup
24     from setuptools.command.install import install
25     from setuptools.command.develop import develop
26     from setuptools.command.egg_info import egg_info
27     from setuptools.command.sdist import sdist
28     from setuptools.command.build_py import build_py
29 except ImportError:
30     from distutils.core import setup
31     from distutils.command.install import install
32     from distutils.command.build_py import build_py
33 
34 NAME = "feast"
35 DESCRIPTION = "Python SDK for Feast"
36 URL = "https://github.com/feast-dev/feast"
37 AUTHOR = "Feast"
38 REQUIRES_PYTHON = ">=3.7.0"
39 
40 REQUIRED = [
41     "Click==7.*",
42     "colorama>=0.3.9",
43     "fastavro>=0.22.11,<0.23",
44     "google-api-core>=1.23.0",
45     "googleapis-common-protos==1.52.*",
46     "grpcio>=1.34.0",
47     "Jinja2>=2.0.0",
48     "jsonschema",
49     "mmh3",
50     "pandas>=1.0.0",
51     "pandavro==1.5.*",
52     "protobuf>=3.10",
53     "pyarrow>=2.0.0",
54     "pydantic>=1.0.0",
55     "PyYAML==5.3.*",
56     "tabulate==0.8.*",
57     "toml==0.10.*",
58     "tqdm==4.*",
59 ]
60 
61 GCP_REQUIRED = [
62     "google-cloud-bigquery>=2.0.*",
63     "google-cloud-bigquery-storage >= 2.0.0",
64     "google-cloud-datastore>=2.1.*",
65     "google-cloud-storage>=1.20.*",
66     "google-cloud-core==1.4.*",
67 ]
68 
69 REDIS_REQUIRED = [
70     "redis-py-cluster==2.1.2",
71 ]
72 
73 CI_REQUIRED = [
74     "cryptography==3.3.2",
75     "flake8",
76     "black==19.10b0",
77     "isort>=5",
78     "grpcio-tools==1.34.0",
79     "grpcio-testing==1.34.0",
80     "mock==2.0.0",
81     "moto",
82     "mypy==0.790",
83     "mypy-protobuf==1.24",
84     "avro==1.10.0",
85     "gcsfs",
86     "urllib3>=1.25.4",
87     "pytest==6.0.0",
88     "pytest-cov",
89     "pytest-lazy-fixture==0.6.3",
90     "pytest-timeout==1.4.2",
91     "pytest-ordering==0.6.*",
92     "pytest-mock==1.10.4",
93     "Sphinx!=4.0.0",
94     "sphinx-rtd-theme",
95     "tenacity",
96     "adlfs==0.5.9",
97     "firebase-admin==4.5.2",
98     "pre-commit",
99     "assertpy==1.1",
100     "google-cloud-bigquery>=2.0.*",
101     "google-cloud-bigquery-storage >= 2.0.0",
102     "google-cloud-datastore>=2.1.*",
103     "google-cloud-storage>=1.20.*",
104     "google-cloud-core==1.4.*",
105     "redis-py-cluster==2.1.2",
106 ]
107 
108 # README file from Feast repo root directory
109 repo_root = (
110     subprocess.Popen(["git", "rev-parse", "--show-toplevel"], stdout=subprocess.PIPE)
111         .communicate()[0]
112         .rstrip()
113         .decode("utf-8")
114 )
115 README_FILE = os.path.join(repo_root, "README.md")
116 with open(README_FILE, "r") as f:
117     LONG_DESCRIPTION = f.read()
118 
119 # Add Support for parsing tags that have a prefix containing '/' (ie 'sdk/go') to setuptools_scm.
120 # Regex modified from default tag regex in:
121 # https://github.com/pypa/setuptools_scm/blob/2a1b46d38fb2b8aeac09853e660bcd0d7c1bc7be/src/setuptools_scm/config.py#L9
122 TAG_REGEX = re.compile(
123     r"^(?:[\/\w-]+)?(?P<version>[vV]?\d+(?:\.\d+){0,2}[^\+]*)(?:\+.*)?$"
124 )
125 
126 
127 class BuildProtoCommand(Command):
128     description = "Builds the proto files into python files."
129 
130     def initialize_options(self):
131         self.protoc = ["python", "-m", "grpc_tools.protoc"]  # find_executable("protoc")
132         self.proto_folder = os.path.join(repo_root, "protos")
133         self.this_package = os.path.join(os.path.dirname(__file__) or os.getcwd(), 'feast/protos')
134         self.sub_folders = ["core", "serving", "types", "storage"]
135 
136     def finalize_options(self):
137         pass
138 
139     def _generate_protos(self, path):
140         proto_files = glob.glob(os.path.join(self.proto_folder, path))
141 
142         subprocess.check_call(self.protoc + [
143             '-I', self.proto_folder,
144             '--python_out', self.this_package,
145             '--grpc_python_out', self.this_package,
146             '--mypy_out', self.this_package] + proto_files)
147 
148     def run(self):
149         for sub_folder in self.sub_folders:
150             self._generate_protos(f'feast/{sub_folder}/*.proto')
151 
152         from pathlib import Path
153 
154         for path in Path('feast/protos').rglob('*.py'):
155             for folder in self.sub_folders:
156                 # Read in the file
157                 with open(path, 'r') as file:
158                     filedata = file.read()
159 
160                 # Replace the target string
161                 filedata = filedata.replace(f'from feast.{folder}', f'from feast.protos.feast.{folder}')
162 
163                 # Write the file out again
164                 with open(path, 'w') as file:
165                     file.write(filedata)
166 
167 
168 class BuildCommand(build_py):
169     """Custom build command."""
170 
171     def run(self):
172         self.run_command('build_proto')
173         build_py.run(self)
174 
175 
176 class DevelopCommand(develop):
177     """Custom develop command."""
178 
179     def run(self):
180         self.run_command('build_proto')
181         develop.run(self)
182 
183 
184 setup(
185     name=NAME,
186     author=AUTHOR,
187     description=DESCRIPTION,
188     long_description=LONG_DESCRIPTION,
189     long_description_content_type="text/markdown",
190     python_requires=REQUIRES_PYTHON,
191     url=URL,
192     packages=find_packages(exclude=("tests",)),
193     install_requires=REQUIRED,
194     # https://stackoverflow.com/questions/28509965/setuptools-development-requirements
195     # Install dev requirements with: pip install -e .[dev]
196     extras_require={
197         "dev": ["mypy-protobuf==1.*", "grpcio-testing==1.*"],
198         "ci": CI_REQUIRED,
199         "gcp": GCP_REQUIRED,
200         "redis": REDIS_REQUIRED,
201     },
202     include_package_data=True,
203     license="Apache",
204     classifiers=[
205         # Trove classifiers
206         # Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
207         "License :: OSI Approved :: Apache Software License",
208         "Programming Language :: Python",
209         "Programming Language :: Python :: 3",
210         "Programming Language :: Python :: 3.7",
211     ],
212     entry_points={"console_scripts": ["feast=feast.cli:cli"]},
213     use_scm_version={"root": "../..", "relative_to": __file__, "tag_regex": TAG_REGEX},
214     setup_requires=["setuptools_scm", "grpcio", "grpcio-tools==1.34.0", "mypy-protobuf", "sphinx!=4.0.0"],
215     package_data={
216         "": [
217             "protos/feast/**/*.proto",
218             "protos/feast/third_party/grpc/health/v1/*.proto",
219             "protos/tensorflow_metadata/proto/v0/*.proto",
220             "feast/protos/feast/**/*.py",
221             "tensorflow_metadata/proto/v0/*.py"
222         ],
223     },
224     cmdclass={
225         "build_proto": BuildProtoCommand,
226         "build_py": BuildCommand,
227         "develop": DevelopCommand,
228     },
229 )
230
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/sdk/python/setup.py b/sdk/python/setup.py
--- a/sdk/python/setup.py
+++ b/sdk/python/setup.py
@@ -40,7 +40,7 @@
 REQUIRED = [
     "Click==7.*",
     "colorama>=0.3.9",
-    "fastavro>=0.22.11,<0.23",
+    "fastavro>=1.1.0",
     "google-api-core>=1.23.0",
     "googleapis-common-protos==1.52.*",
     "grpcio>=1.34.0",

{"golden_diff": "diff --git a/sdk/python/setup.py b/sdk/python/setup.py\n--- a/sdk/python/setup.py\n+++ b/sdk/python/setup.py\n@@ -40,7 +40,7 @@\n REQUIRED = [\n     \"Click==7.*\",\n     \"colorama>=0.3.9\",\n-    \"fastavro>=0.22.11,<0.23\",\n+    \"fastavro>=1.1.0\",\n     \"google-api-core>=1.23.0\",\n     \"googleapis-common-protos==1.52.*\",\n     \"grpcio>=1.34.0\",\n", "issue": "Bump fastavro version\n**Is your feature request related to a problem? Please describe.**\r\nThe version of Fastavro that we're using is kinda old and may be buggy soon. It's also causing some version conflicts with packages that have already upgraded to the newer (1.xx) versions.\r\n\r\n**Describe the solution you'd like**\r\nBump Fastavro to 1.x.x\r\n\n", "before_files": [{"content": "# Copyright 2019 The Feast Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\nimport glob\nimport os\nimport re\nimport subprocess\n\nfrom distutils.cmd import Command\nfrom setuptools import find_packages\n\ntry:\n    from setuptools import setup\n    from setuptools.command.install import install\n    from setuptools.command.develop import develop\n    from setuptools.command.egg_info import egg_info\n    from setuptools.command.sdist import sdist\n    from setuptools.command.build_py import build_py\nexcept ImportError:\n    from distutils.core import setup\n    from distutils.command.install import install\n    from distutils.command.build_py import build_py\n\nNAME = \"feast\"\nDESCRIPTION = \"Python SDK for Feast\"\nURL = \"https://github.com/feast-dev/feast\"\nAUTHOR = \"Feast\"\nREQUIRES_PYTHON = \">=3.7.0\"\n\nREQUIRED = [\n    \"Click==7.*\",\n    \"colorama>=0.3.9\",\n    \"fastavro>=0.22.11,<0.23\",\n    \"google-api-core>=1.23.0\",\n    \"googleapis-common-protos==1.52.*\",\n    \"grpcio>=1.34.0\",\n    \"Jinja2>=2.0.0\",\n    \"jsonschema\",\n    \"mmh3\",\n    \"pandas>=1.0.0\",\n    \"pandavro==1.5.*\",\n    \"protobuf>=3.10\",\n    \"pyarrow>=2.0.0\",\n    \"pydantic>=1.0.0\",\n    \"PyYAML==5.3.*\",\n    \"tabulate==0.8.*\",\n    \"toml==0.10.*\",\n    \"tqdm==4.*\",\n]\n\nGCP_REQUIRED = [\n    \"google-cloud-bigquery>=2.0.*\",\n    \"google-cloud-bigquery-storage >= 2.0.0\",\n    \"google-cloud-datastore>=2.1.*\",\n    \"google-cloud-storage>=1.20.*\",\n    \"google-cloud-core==1.4.*\",\n]\n\nREDIS_REQUIRED = [\n    \"redis-py-cluster==2.1.2\",\n]\n\nCI_REQUIRED = [\n    \"cryptography==3.3.2\",\n    \"flake8\",\n    \"black==19.10b0\",\n    \"isort>=5\",\n    \"grpcio-tools==1.34.0\",\n    \"grpcio-testing==1.34.0\",\n    \"mock==2.0.0\",\n    \"moto\",\n    \"mypy==0.790\",\n    \"mypy-protobuf==1.24\",\n    \"avro==1.10.0\",\n    \"gcsfs\",\n    \"urllib3>=1.25.4\",\n    \"pytest==6.0.0\",\n    \"pytest-cov\",\n    \"pytest-lazy-fixture==0.6.3\",\n    \"pytest-timeout==1.4.2\",\n    \"pytest-ordering==0.6.*\",\n    \"pytest-mock==1.10.4\",\n    \"Sphinx!=4.0.0\",\n    \"sphinx-rtd-theme\",\n    \"tenacity\",\n    \"adlfs==0.5.9\",\n    \"firebase-admin==4.5.2\",\n    \"pre-commit\",\n    \"assertpy==1.1\",\n    \"google-cloud-bigquery>=2.0.*\",\n    \"google-cloud-bigquery-storage >= 2.0.0\",\n    \"google-cloud-datastore>=2.1.*\",\n    \"google-cloud-storage>=1.20.*\",\n    \"google-cloud-core==1.4.*\",\n    \"redis-py-cluster==2.1.2\",\n]\n\n# README file from Feast repo root directory\nrepo_root = (\n    subprocess.Popen([\"git\", \"rev-parse\", \"--show-toplevel\"], stdout=subprocess.PIPE)\n        .communicate()[0]\n        .rstrip()\n        .decode(\"utf-8\")\n)\nREADME_FILE = os.path.join(repo_root, \"README.md\")\nwith open(README_FILE, \"r\") as f:\n    LONG_DESCRIPTION = f.read()\n\n# Add Support for parsing tags that have a prefix containing '/' (ie 'sdk/go') to setuptools_scm.\n# Regex modified from default tag regex in:\n# https://github.com/pypa/setuptools_scm/blob/2a1b46d38fb2b8aeac09853e660bcd0d7c1bc7be/src/setuptools_scm/config.py#L9\nTAG_REGEX = re.compile(\n    r\"^(?:[\\/\\w-]+)?(?P<version>[vV]?\\d+(?:\\.\\d+){0,2}[^\\+]*)(?:\\+.*)?$\"\n)\n\n\nclass BuildProtoCommand(Command):\n    description = \"Builds the proto files into python files.\"\n\n    def initialize_options(self):\n        self.protoc = [\"python\", \"-m\", \"grpc_tools.protoc\"]  # find_executable(\"protoc\")\n        self.proto_folder = os.path.join(repo_root, \"protos\")\n        self.this_package = os.path.join(os.path.dirname(__file__) or os.getcwd(), 'feast/protos')\n        self.sub_folders = [\"core\", \"serving\", \"types\", \"storage\"]\n\n    def finalize_options(self):\n        pass\n\n    def _generate_protos(self, path):\n        proto_files = glob.glob(os.path.join(self.proto_folder, path))\n\n        subprocess.check_call(self.protoc + [\n            '-I', self.proto_folder,\n            '--python_out', self.this_package,\n            '--grpc_python_out', self.this_package,\n            '--mypy_out', self.this_package] + proto_files)\n\n    def run(self):\n        for sub_folder in self.sub_folders:\n            self._generate_protos(f'feast/{sub_folder}/*.proto')\n\n        from pathlib import Path\n\n        for path in Path('feast/protos').rglob('*.py'):\n            for folder in self.sub_folders:\n                # Read in the file\n                with open(path, 'r') as file:\n                    filedata = file.read()\n\n                # Replace the target string\n                filedata = filedata.replace(f'from feast.{folder}', f'from feast.protos.feast.{folder}')\n\n                # Write the file out again\n                with open(path, 'w') as file:\n                    file.write(filedata)\n\n\nclass BuildCommand(build_py):\n    \"\"\"Custom build command.\"\"\"\n\n    def run(self):\n        self.run_command('build_proto')\n        build_py.run(self)\n\n\nclass DevelopCommand(develop):\n    \"\"\"Custom develop command.\"\"\"\n\n    def run(self):\n        self.run_command('build_proto')\n        develop.run(self)\n\n\nsetup(\n    name=NAME,\n    author=AUTHOR,\n    description=DESCRIPTION,\n    long_description=LONG_DESCRIPTION,\n    long_description_content_type=\"text/markdown\",\n    python_requires=REQUIRES_PYTHON,\n    url=URL,\n    packages=find_packages(exclude=(\"tests\",)),\n    install_requires=REQUIRED,\n    # https://stackoverflow.com/questions/28509965/setuptools-development-requirements\n    # Install dev requirements with: pip install -e .[dev]\n    extras_require={\n        \"dev\": [\"mypy-protobuf==1.*\", \"grpcio-testing==1.*\"],\n        \"ci\": CI_REQUIRED,\n        \"gcp\": GCP_REQUIRED,\n        \"redis\": REDIS_REQUIRED,\n    },\n    include_package_data=True,\n    license=\"Apache\",\n    classifiers=[\n        # Trove classifiers\n        # Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers\n        \"License :: OSI Approved :: Apache Software License\",\n        \"Programming Language :: Python\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.7\",\n    ],\n    entry_points={\"console_scripts\": [\"feast=feast.cli:cli\"]},\n    use_scm_version={\"root\": \"../..\", \"relative_to\": __file__, \"tag_regex\": TAG_REGEX},\n    setup_requires=[\"setuptools_scm\", \"grpcio\", \"grpcio-tools==1.34.0\", \"mypy-protobuf\", \"sphinx!=4.0.0\"],\n    package_data={\n        \"\": [\n            \"protos/feast/**/*.proto\",\n            \"protos/feast/third_party/grpc/health/v1/*.proto\",\n            \"protos/tensorflow_metadata/proto/v0/*.proto\",\n            \"feast/protos/feast/**/*.py\",\n            \"tensorflow_metadata/proto/v0/*.py\"\n        ],\n    },\n    cmdclass={\n        \"build_proto\": BuildProtoCommand,\n        \"build_py\": BuildCommand,\n        \"develop\": DevelopCommand,\n    },\n)\n", "path": "sdk/python/setup.py"}], "after_files": [{"content": "# Copyright 2019 The Feast Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\nimport glob\nimport os\nimport re\nimport subprocess\n\nfrom distutils.cmd import Command\nfrom setuptools import find_packages\n\ntry:\n    from setuptools import setup\n    from setuptools.command.install import install\n    from setuptools.command.develop import develop\n    from setuptools.command.egg_info import egg_info\n    from setuptools.command.sdist import sdist\n    from setuptools.command.build_py import build_py\nexcept ImportError:\n    from distutils.core import setup\n    from distutils.command.install import install\n    from distutils.command.build_py import build_py\n\nNAME = \"feast\"\nDESCRIPTION = \"Python SDK for Feast\"\nURL = \"https://github.com/feast-dev/feast\"\nAUTHOR = \"Feast\"\nREQUIRES_PYTHON = \">=3.7.0\"\n\nREQUIRED = [\n    \"Click==7.*\",\n    \"colorama>=0.3.9\",\n    \"fastavro>=1.1.0\",\n    \"google-api-core>=1.23.0\",\n    \"googleapis-common-protos==1.52.*\",\n    \"grpcio>=1.34.0\",\n    \"Jinja2>=2.0.0\",\n    \"jsonschema\",\n    \"mmh3\",\n    \"pandas>=1.0.0\",\n    \"pandavro==1.5.*\",\n    \"protobuf>=3.10\",\n    \"pyarrow>=2.0.0\",\n    \"pydantic>=1.0.0\",\n    \"PyYAML==5.3.*\",\n    \"tabulate==0.8.*\",\n    \"toml==0.10.*\",\n    \"tqdm==4.*\",\n]\n\nGCP_REQUIRED = [\n    \"google-cloud-bigquery>=2.0.*\",\n    \"google-cloud-bigquery-storage >= 2.0.0\",\n    \"google-cloud-datastore>=2.1.*\",\n    \"google-cloud-storage>=1.20.*\",\n    \"google-cloud-core==1.4.*\",\n]\n\nCI_REQUIRED = [\n    \"cryptography==3.3.2\",\n    \"flake8\",\n    \"black==19.10b0\",\n    \"isort>=5\",\n    \"grpcio-tools==1.34.0\",\n    \"grpcio-testing==1.34.0\",\n    \"mock==2.0.0\",\n    \"moto\",\n    \"mypy==0.790\",\n    \"mypy-protobuf==1.24\",\n    \"avro==1.10.0\",\n    \"gcsfs\",\n    \"urllib3>=1.25.4\",\n    \"pytest==6.0.0\",\n    \"pytest-cov\",\n    \"pytest-lazy-fixture==0.6.3\",\n    \"pytest-timeout==1.4.2\",\n    \"pytest-ordering==0.6.*\",\n    \"pytest-mock==1.10.4\",\n    \"Sphinx!=4.0.0\",\n    \"sphinx-rtd-theme\",\n    \"tenacity\",\n    \"adlfs==0.5.9\",\n    \"firebase-admin==4.5.2\",\n    \"pre-commit\",\n    \"assertpy==1.1\",\n    \"google-cloud-bigquery>=2.0.*\",\n    \"google-cloud-bigquery-storage >= 2.0.0\",\n    \"google-cloud-datastore>=2.1.*\",\n    \"google-cloud-storage>=1.20.*\",\n    \"google-cloud-core==1.4.*\",\n]\n\n# README file from Feast repo root directory\nrepo_root = (\n    subprocess.Popen([\"git\", \"rev-parse\", \"--show-toplevel\"], stdout=subprocess.PIPE)\n        .communicate()[0]\n        .rstrip()\n        .decode(\"utf-8\")\n)\nREADME_FILE = os.path.join(repo_root, \"README.md\")\nwith open(README_FILE, \"r\") as f:\n    LONG_DESCRIPTION = f.read()\n\n# Add Support for parsing tags that have a prefix containing '/' (ie 'sdk/go') to setuptools_scm.\n# Regex modified from default tag regex in:\n# https://github.com/pypa/setuptools_scm/blob/2a1b46d38fb2b8aeac09853e660bcd0d7c1bc7be/src/setuptools_scm/config.py#L9\nTAG_REGEX = re.compile(\n    r\"^(?:[\\/\\w-]+)?(?P<version>[vV]?\\d+(?:\\.\\d+){0,2}[^\\+]*)(?:\\+.*)?$\"\n)\n\n\nclass BuildProtoCommand(Command):\n    description = \"Builds the proto files into python files.\"\n\n    def initialize_options(self):\n        self.protoc = [\"python\", \"-m\", \"grpc_tools.protoc\"]  # find_executable(\"protoc\")\n        self.proto_folder = os.path.join(repo_root, \"protos\")\n        self.this_package = os.path.join(os.path.dirname(__file__) or os.getcwd(), 'feast/protos')\n        self.sub_folders = [\"core\", \"serving\", \"types\", \"storage\"]\n\n    def finalize_options(self):\n        pass\n\n    def _generate_protos(self, path):\n        proto_files = glob.glob(os.path.join(self.proto_folder, path))\n\n        subprocess.check_call(self.protoc + [\n            '-I', self.proto_folder,\n            '--python_out', self.this_package,\n            '--grpc_python_out', self.this_package,\n            '--mypy_out', self.this_package] + proto_files)\n\n    def run(self):\n        for sub_folder in self.sub_folders:\n            self._generate_protos(f'feast/{sub_folder}/*.proto')\n\n        from pathlib import Path\n\n        for path in Path('feast/protos').rglob('*.py'):\n            for folder in self.sub_folders:\n                # Read in the file\n                with open(path, 'r') as file:\n                    filedata = file.read()\n\n                # Replace the target string\n                filedata = filedata.replace(f'from feast.{folder}', f'from feast.protos.feast.{folder}')\n\n                # Write the file out again\n                with open(path, 'w') as file:\n                    file.write(filedata)\n\n\nclass BuildCommand(build_py):\n    \"\"\"Custom build command.\"\"\"\n\n    def run(self):\n        self.run_command('build_proto')\n        build_py.run(self)\n\n\nclass DevelopCommand(develop):\n    \"\"\"Custom develop command.\"\"\"\n\n    def run(self):\n        self.run_command('build_proto')\n        develop.run(self)\n\n\nsetup(\n    name=NAME,\n    author=AUTHOR,\n    description=DESCRIPTION,\n    long_description=LONG_DESCRIPTION,\n    long_description_content_type=\"text/markdown\",\n    python_requires=REQUIRES_PYTHON,\n    url=URL,\n    packages=find_packages(exclude=(\"tests\",)),\n    install_requires=REQUIRED,\n    # https://stackoverflow.com/questions/28509965/setuptools-development-requirements\n    # Install dev requirements with: pip install -e .[dev]\n    extras_require={\n        \"dev\": [\"mypy-protobuf==1.*\", \"grpcio-testing==1.*\"],\n        \"ci\": CI_REQUIRED,\n        \"gcp\": GCP_REQUIRED,\n    },\n    include_package_data=True,\n    license=\"Apache\",\n    classifiers=[\n        # Trove classifiers\n        # Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers\n        \"License :: OSI Approved :: Apache Software License\",\n        \"Programming Language :: Python\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.7\",\n    ],\n    entry_points={\"console_scripts\": [\"feast=feast.cli:cli\"]},\n    use_scm_version={\"root\": \"../..\", \"relative_to\": __file__, \"tag_regex\": TAG_REGEX},\n    setup_requires=[\"setuptools_scm\", \"grpcio\", \"grpcio-tools==1.34.0\", \"mypy-protobuf\", \"sphinx!=4.0.0\"],\n    package_data={\n        \"\": [\n            \"protos/feast/**/*.proto\",\n            \"protos/feast/third_party/grpc/health/v1/*.proto\",\n            \"protos/tensorflow_metadata/proto/v0/*.proto\",\n            \"feast/protos/feast/**/*.py\",\n            \"tensorflow_metadata/proto/v0/*.py\"\n        ],\n    },\n    cmdclass={\n        \"build_proto\": BuildProtoCommand,\n        \"build_py\": BuildCommand,\n        \"develop\": DevelopCommand,\n    },\n)\n", "path": "sdk/python/setup.py"}]}