We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Dependency PyYAML 5.3.* has vulnerability issues
## Expected Behavior 

According to [CVE-2020-14343](https://nvd.nist.gov/vuln/detail/CVE-2020-14343):

> A vulnerability was discovered in the PyYAML library in versions before 5.4, where it is susceptible to arbitrary code execution when it processes untrusted YAML files through the full_load method or with the FullLoader loader. Applications that use the library to process untrusted input may be vulnerable to this flaw. This flaw allows an attacker to execute arbitrary code on the system by abusing the python/object/new constructor. This flaw is due to an incomplete fix for CVE-2020-1747. See CVE-2020-14343.

## Current Behavior

Feast Python SDK requires `PyYAML==5.3.*` version.

This not only affects Feast, but also any app depending on it, since dependencies are shared.

## Steps to reproduce

N/A

### Specifications

N/A

## Possible Solution

Bump PyYAML to a ">=5.4" version.

--- 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>=1.1.0",
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     "tenacity>=7.*",
58     "toml==0.10.*",
59     "tqdm==4.*",
60 ]
61 
62 GCP_REQUIRED = [
63     "google-cloud-bigquery>=2.0.*",
64     "google-cloud-bigquery-storage >= 2.0.0",
65     "google-cloud-datastore>=2.1.*",
66     "google-cloud-storage>=1.34.*",
67     "google-cloud-core==1.4.*",
68 ]
69 
70 REDIS_REQUIRED = [
71     "redis-py-cluster==2.1.2",
72 ]
73 
74 AWS_REQUIRED = [
75     "boto3==1.17.*",
76 ]
77 
78 CI_REQUIRED = [
79     "cryptography==3.3.2",
80     "flake8",
81     "black==19.10b0",
82     "isort>=5",
83     "grpcio-tools==1.34.0",
84     "grpcio-testing==1.34.0",
85     "mock==2.0.0",
86     "moto",
87     "mypy==0.790",
88     "mypy-protobuf==1.24",
89     "avro==1.10.0",
90     "gcsfs",
91     "urllib3>=1.25.4",
92     "pytest==6.0.0",
93     "pytest-cov",
94     "pytest-xdist",
95     "pytest-lazy-fixture==0.6.3",
96     "pytest-timeout==1.4.2",
97     "pytest-ordering==0.6.*",
98     "pytest-mock==1.10.4",
99     "Sphinx!=4.0.0",
100     "sphinx-rtd-theme",
101     "adlfs==0.5.9",
102     "firebase-admin==4.5.2",
103     "pre-commit",
104     "assertpy==1.1",
105     "google-cloud-bigquery>=2.0.*",
106     "google-cloud-bigquery-storage >= 2.0.0",
107     "google-cloud-datastore>=2.1.*",
108     "google-cloud-storage>=1.20.*",
109     "google-cloud-core==1.4.*",
110     "redis-py-cluster==2.1.2",
111     "boto3==1.17.*",
112 ]
113 
114 
115 # README file from Feast repo root directory
116 repo_root = (
117     subprocess.Popen(["git", "rev-parse", "--show-toplevel"], stdout=subprocess.PIPE)
118         .communicate()[0]
119         .rstrip()
120         .decode("utf-8")
121 )
122 README_FILE = os.path.join(repo_root, "README.md")
123 with open(README_FILE, "r") as f:
124     LONG_DESCRIPTION = f.read()
125 
126 # Add Support for parsing tags that have a prefix containing '/' (ie 'sdk/go') to setuptools_scm.
127 # Regex modified from default tag regex in:
128 # https://github.com/pypa/setuptools_scm/blob/2a1b46d38fb2b8aeac09853e660bcd0d7c1bc7be/src/setuptools_scm/config.py#L9
129 TAG_REGEX = re.compile(
130     r"^(?:[\/\w-]+)?(?P<version>[vV]?\d+(?:\.\d+){0,2}[^\+]*)(?:\+.*)?$"
131 )
132 
133 
134 class BuildProtoCommand(Command):
135     description = "Builds the proto files into python files."
136 
137     def initialize_options(self):
138         self.protoc = ["python", "-m", "grpc_tools.protoc"]  # find_executable("protoc")
139         self.proto_folder = os.path.join(repo_root, "protos")
140         self.this_package = os.path.join(os.path.dirname(__file__) or os.getcwd(), 'feast/protos')
141         self.sub_folders = ["core", "serving", "types", "storage"]
142 
143     def finalize_options(self):
144         pass
145 
146     def _generate_protos(self, path):
147         proto_files = glob.glob(os.path.join(self.proto_folder, path))
148 
149         subprocess.check_call(self.protoc + [
150             '-I', self.proto_folder,
151             '--python_out', self.this_package,
152             '--grpc_python_out', self.this_package,
153             '--mypy_out', self.this_package] + proto_files)
154 
155     def run(self):
156         for sub_folder in self.sub_folders:
157             self._generate_protos(f'feast/{sub_folder}/*.proto')
158 
159         from pathlib import Path
160 
161         for path in Path('feast/protos').rglob('*.py'):
162             for folder in self.sub_folders:
163                 # Read in the file
164                 with open(path, 'r') as file:
165                     filedata = file.read()
166 
167                 # Replace the target string
168                 filedata = filedata.replace(f'from feast.{folder}', f'from feast.protos.feast.{folder}')
169 
170                 # Write the file out again
171                 with open(path, 'w') as file:
172                     file.write(filedata)
173 
174 
175 class BuildCommand(build_py):
176     """Custom build command."""
177 
178     def run(self):
179         self.run_command('build_proto')
180         build_py.run(self)
181 
182 
183 class DevelopCommand(develop):
184     """Custom develop command."""
185 
186     def run(self):
187         self.run_command('build_proto')
188         develop.run(self)
189 
190 
191 setup(
192     name=NAME,
193     author=AUTHOR,
194     description=DESCRIPTION,
195     long_description=LONG_DESCRIPTION,
196     long_description_content_type="text/markdown",
197     python_requires=REQUIRES_PYTHON,
198     url=URL,
199     packages=find_packages(exclude=("tests",)),
200     install_requires=REQUIRED,
201     # https://stackoverflow.com/questions/28509965/setuptools-development-requirements
202     # Install dev requirements with: pip install -e .[dev]
203     extras_require={
204         "dev": ["mypy-protobuf==1.*", "grpcio-testing==1.*"],
205         "ci": CI_REQUIRED,
206         "gcp": GCP_REQUIRED,
207         "aws": AWS_REQUIRED,
208         "redis": REDIS_REQUIRED,
209     },
210     include_package_data=True,
211     license="Apache",
212     classifiers=[
213         # Trove classifiers
214         # Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
215         "License :: OSI Approved :: Apache Software License",
216         "Programming Language :: Python",
217         "Programming Language :: Python :: 3",
218         "Programming Language :: Python :: 3.7",
219     ],
220     entry_points={"console_scripts": ["feast=feast.cli:cli"]},
221     use_scm_version={"root": "../..", "relative_to": __file__, "tag_regex": TAG_REGEX},
222     setup_requires=["setuptools_scm", "grpcio", "grpcio-tools==1.34.0", "mypy-protobuf", "sphinx!=4.0.0"],
223     package_data={
224         "": [
225             "protos/feast/**/*.proto",
226             "protos/feast/third_party/grpc/health/v1/*.proto",
227             "protos/tensorflow_metadata/proto/v0/*.proto",
228             "feast/protos/feast/**/*.py",
229             "tensorflow_metadata/proto/v0/*.py"
230         ],
231     },
232     cmdclass={
233         "build_proto": BuildProtoCommand,
234         "build_py": BuildCommand,
235         "develop": DevelopCommand,
236     },
237 )
238
```
--- 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
@@ -52,7 +52,7 @@
     "protobuf>=3.10",
     "pyarrow>=2.0.0",
     "pydantic>=1.0.0",
-    "PyYAML==5.3.*",
+    "PyYAML>=5.4.*",
     "tabulate==0.8.*",
     "tenacity>=7.*",
     "toml==0.10.*",

{"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@@ -52,7 +52,7 @@\n     \"protobuf>=3.10\",\n     \"pyarrow>=2.0.0\",\n     \"pydantic>=1.0.0\",\n-    \"PyYAML==5.3.*\",\n+    \"PyYAML>=5.4.*\",\n     \"tabulate==0.8.*\",\n     \"tenacity>=7.*\",\n     \"toml==0.10.*\",\n", "issue": "Dependency PyYAML 5.3.* has vulnerability issues\n## Expected Behavior \r\n\r\nAccording to [CVE-2020-14343](https://nvd.nist.gov/vuln/detail/CVE-2020-14343):\r\n\r\n> A vulnerability was discovered in the PyYAML library in versions before 5.4, where it is susceptible to arbitrary code execution when it processes untrusted YAML files through the full_load method or with the FullLoader loader. Applications that use the library to process untrusted input may be vulnerable to this flaw. This flaw allows an attacker to execute arbitrary code on the system by abusing the python/object/new constructor. This flaw is due to an incomplete fix for CVE-2020-1747. See CVE-2020-14343.\r\n\r\n## Current Behavior\r\n\r\nFeast Python SDK requires `PyYAML==5.3.*` version.\r\n\r\nThis not only affects Feast, but also any app depending on it, since dependencies are shared.\r\n\r\n## Steps to reproduce\r\n\r\nN/A\r\n\r\n### Specifications\r\n\r\nN/A\r\n\r\n## Possible Solution\r\n\r\nBump PyYAML to a \">=5.4\" version.\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>=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    \"tenacity>=7.*\",\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.34.*\",\n    \"google-cloud-core==1.4.*\",\n]\n\nREDIS_REQUIRED = [\n    \"redis-py-cluster==2.1.2\",\n]\n\nAWS_REQUIRED = [\n    \"boto3==1.17.*\",\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-xdist\",\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    \"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    \"boto3==1.17.*\",\n]\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        \"aws\": AWS_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.4.*\",\n    \"tabulate==0.8.*\",\n    \"tenacity>=7.*\",\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.34.*\",\n    \"google-cloud-core==1.4.*\",\n]\n\nREDIS_REQUIRED = [\n    \"redis-py-cluster==2.1.2\",\n]\n\nAWS_REQUIRED = [\n    \"boto3==1.17.*\",\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-xdist\",\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    \"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    \"boto3==1.17.*\",\n]\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        \"aws\": AWS_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"}]}