We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Python 3.6 Local Mode breaks due to usage of pathlib.Path and sqlite3
## Expected Behavior 

Python 3.6 in local mode works when following the quickstart 

## Current Behavior

Unable to follow quickstart due to the error as shown below

## Steps to reproduce

1. Create a Python 3.6 environment. E.g. `conda create --name=feast36 python=3.6`
2. Install feast and other deps `pip install feast`
3. Follow the quickstart

When running the quick start it will fail with the following msg.

```
(feast36) ➜  temp_feat$ feast init feat1

Creating a new Feast repository in /home/user/Documents/temp_feat/feat1.

(feast36) ➜  temp_feat$ cd feat1
(feast36) ➜  feat1$ feast apply
Registered entity driver_id
Registered feature view driver_hourly_stats
Deploying infrastructure for driver_hourly_stats
Traceback (most recent call last):
  File "/home/user/anaconda3/envs/feast36/bin/feast", line 8, in <module>
    sys.exit(cli())
  File "/home/user/anaconda3/envs/feast36/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/user/anaconda3/envs/feast36/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/user/anaconda3/envs/feast36/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/user/anaconda3/envs/feast36/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/user/anaconda3/envs/feast36/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/user/anaconda3/envs/feast36/lib/python3.6/site-packages/feast/cli.py", line 160, in apply_total_command
    apply_total(repo_config, Path.cwd())
  File "/home/user/anaconda3/envs/feast36/lib/python3.6/site-packages/feast/repo_operations.py", line 148, in apply_total
    partial=False,
  File "/home/user/anaconda3/envs/feast36/lib/python3.6/site-packages/feast/infra/local.py", line 55, in update_infra
    conn = self._get_conn()
  File "/home/user/anaconda3/envs/feast36/lib/python3.6/site-packages/feast/infra/local.py", line 45, in _get_conn
    self._db_path, detect_types=sqlite3.PARSE_DECLTYPES | sqlite3.PARSE_COLNAMES
TypeError: argument 1 must be str, not PosixPath
```


### Specifications

- Version: 3.6
- Platform: Ubuntu 20.04, also tested on Ubuntu 18.05
- Subsystem:

## Possible Solution

The sqlite3 issue is resolved in Python 3.7 as shown here:
https://bugs.python.org/issue33496

A solution could be to add `self._db_path = str(self._db_path)` or similar in the `infra/local.py` file

I couldn't find a similar issue - in the case its resolved in an upstream commit...


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

{"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@@ -35,7 +35,7 @@\n DESCRIPTION = \"Python SDK for Feast\"\n URL = \"https://github.com/feast-dev/feast\"\n AUTHOR = \"Feast\"\n-REQUIRES_PYTHON = \">=3.6.0\"\n+REQUIRES_PYTHON = \">=3.7.0\"\n \n REQUIRED = [\n     \"Click==7.*\",\n@@ -191,7 +191,7 @@\n         \"License :: OSI Approved :: Apache Software License\",\n         \"Programming Language :: Python\",\n         \"Programming Language :: Python :: 3\",\n-        \"Programming Language :: Python :: 3.6\",\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", "issue": "Python 3.6 Local Mode breaks due to usage of pathlib.Path and sqlite3\n## Expected Behavior \r\n\r\nPython 3.6 in local mode works when following the quickstart \r\n\r\n## Current Behavior\r\n\r\nUnable to follow quickstart due to the error as shown below\r\n\r\n## Steps to reproduce\r\n\r\n1. Create a Python 3.6 environment. E.g. `conda create --name=feast36 python=3.6`\r\n2. Install feast and other deps `pip install feast`\r\n3. Follow the quickstart\r\n\r\nWhen running the quick start it will fail with the following msg.\r\n\r\n```\r\n(feast36) \u279c  temp_feat$ feast init feat1\r\n\r\nCreating a new Feast repository in /home/user/Documents/temp_feat/feat1.\r\n\r\n(feast36) \u279c  temp_feat$ cd feat1\r\n(feast36) \u279c  feat1$ feast apply\r\nRegistered entity driver_id\r\nRegistered feature view driver_hourly_stats\r\nDeploying infrastructure for driver_hourly_stats\r\nTraceback (most recent call last):\r\n  File \"/home/user/anaconda3/envs/feast36/bin/feast\", line 8, in <module>\r\n    sys.exit(cli())\r\n  File \"/home/user/anaconda3/envs/feast36/lib/python3.6/site-packages/click/core.py\", line 829, in __call__\r\n    return self.main(*args, **kwargs)\r\n  File \"/home/user/anaconda3/envs/feast36/lib/python3.6/site-packages/click/core.py\", line 782, in main\r\n    rv = self.invoke(ctx)\r\n  File \"/home/user/anaconda3/envs/feast36/lib/python3.6/site-packages/click/core.py\", line 1259, in invoke\r\n    return _process_result(sub_ctx.command.invoke(sub_ctx))\r\n  File \"/home/user/anaconda3/envs/feast36/lib/python3.6/site-packages/click/core.py\", line 1066, in invoke\r\n    return ctx.invoke(self.callback, **ctx.params)\r\n  File \"/home/user/anaconda3/envs/feast36/lib/python3.6/site-packages/click/core.py\", line 610, in invoke\r\n    return callback(*args, **kwargs)\r\n  File \"/home/user/anaconda3/envs/feast36/lib/python3.6/site-packages/feast/cli.py\", line 160, in apply_total_command\r\n    apply_total(repo_config, Path.cwd())\r\n  File \"/home/user/anaconda3/envs/feast36/lib/python3.6/site-packages/feast/repo_operations.py\", line 148, in apply_total\r\n    partial=False,\r\n  File \"/home/user/anaconda3/envs/feast36/lib/python3.6/site-packages/feast/infra/local.py\", line 55, in update_infra\r\n    conn = self._get_conn()\r\n  File \"/home/user/anaconda3/envs/feast36/lib/python3.6/site-packages/feast/infra/local.py\", line 45, in _get_conn\r\n    self._db_path, detect_types=sqlite3.PARSE_DECLTYPES | sqlite3.PARSE_COLNAMES\r\nTypeError: argument 1 must be str, not PosixPath\r\n```\r\n\r\n\r\n### Specifications\r\n\r\n- Version: 3.6\r\n- Platform: Ubuntu 20.04, also tested on Ubuntu 18.05\r\n- Subsystem:\r\n\r\n## Possible Solution\r\n\r\nThe sqlite3 issue is resolved in Python 3.7 as shown here:\r\nhttps://bugs.python.org/issue33496\r\n\r\nA solution could be to add `self._db_path = str(self._db_path)` or similar in the `infra/local.py` file\r\n\r\nI couldn't find a similar issue - in the case its resolved in an upstream commit...\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.6.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    \"google-cloud-bigquery>=2.0.*\",\n    \"google-cloud-bigquery-storage >= 2.0.0\",\n    \"google-cloud-storage>=1.20.*\",\n    \"google-cloud-core==1.4.*\",\n    \"googleapis-common-protos==1.52.*\",\n    \"grpcio==1.31.0\",\n    \"Jinja2>=2.0.0\",\n    \"jsonschema\",\n    \"mmh3\",\n    \"numpy<1.20.0\",\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\nCI_REQUIRED = [\n    \"cryptography==3.3.2\",\n    \"flake8\",\n    \"black==19.10b0\",\n    \"isort>=5\",\n    \"grpcio-tools==1.31.0\",\n    \"grpcio-testing==1.31.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-lazy-fixture==0.6.3\",\n    \"pytest-timeout==1.4.2\",\n    \"pytest-ordering==0.6.*\",\n    \"pytest-mock==1.10.4\",\n    \"Sphinx\",\n    \"sphinx-rtd-theme\",\n    \"tenacity\",\n    \"adlfs==0.5.9\",\n    \"firebase-admin==4.5.2\",\n    \"google-cloud-datastore==2.1.0\",\n    \"pre-commit\"\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(os.path.join(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    },\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.6\",\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.31.0\", \"mypy-protobuf\", \"sphinx\"],\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>=0.22.11,<0.23\",\n    \"google-api-core>=1.23.0\",\n    \"google-cloud-bigquery>=2.0.*\",\n    \"google-cloud-bigquery-storage >= 2.0.0\",\n    \"google-cloud-storage>=1.20.*\",\n    \"google-cloud-core==1.4.*\",\n    \"googleapis-common-protos==1.52.*\",\n    \"grpcio==1.31.0\",\n    \"Jinja2>=2.0.0\",\n    \"jsonschema\",\n    \"mmh3\",\n    \"numpy<1.20.0\",\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\nCI_REQUIRED = [\n    \"cryptography==3.3.2\",\n    \"flake8\",\n    \"black==19.10b0\",\n    \"isort>=5\",\n    \"grpcio-tools==1.31.0\",\n    \"grpcio-testing==1.31.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-lazy-fixture==0.6.3\",\n    \"pytest-timeout==1.4.2\",\n    \"pytest-ordering==0.6.*\",\n    \"pytest-mock==1.10.4\",\n    \"Sphinx\",\n    \"sphinx-rtd-theme\",\n    \"tenacity\",\n    \"adlfs==0.5.9\",\n    \"firebase-admin==4.5.2\",\n    \"google-cloud-datastore==2.1.0\",\n    \"pre-commit\"\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(os.path.join(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    },\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.31.0\", \"mypy-protobuf\", \"sphinx\"],\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"}]}