prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Drop Python3.5 Support
  Per SIG Build, python3.5 will not be supported in TF2.4 since it has reached end of life. We should align.
  
  </issue>
  <code>
  [start of setup.py]
  1 # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
  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 #     http://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 # ==============================================================================
  15 """TensorFlow Addons.
  16 
  17 TensorFlow Addons is a repository of contributions that conform to well-
  18 established API patterns, but implement new functionality not available
  19 in core TensorFlow. TensorFlow natively supports a large number of
  20 operators, layers, metrics, losses, and optimizers. However, in a fast
  21 moving field like ML, there are many interesting new developments that
  22 cannot be integrated into core TensorFlow (because their broad
  23 applicability is not yet clear, or it is mostly used by a smaller subset
  24 of the community).
  25 """
  26 
  27 import os
  28 from pathlib import Path
  29 import sys
  30 
  31 from datetime import datetime
  32 from setuptools import find_packages
  33 from setuptools import setup
  34 from setuptools.dist import Distribution
  35 from setuptools import Extension
  36 
  37 DOCLINES = __doc__.split("\n")
  38 
  39 
  40 def get_last_commit_time() -> str:
  41     string_time = os.getenv("NIGHTLY_TIME").replace('"', "")
  42     return datetime.strptime(string_time, "%Y-%m-%dT%H:%M:%SZ").strftime("%Y%m%d%H%M%S")
  43 
  44 
  45 def get_project_name_version():
  46     # Version
  47     version = {}
  48     base_dir = os.path.dirname(os.path.abspath(__file__))
  49     with open(os.path.join(base_dir, "tensorflow_addons", "version.py")) as fp:
  50         exec(fp.read(), version)
  51 
  52     project_name = "tensorflow-addons"
  53     if "--nightly" in sys.argv:
  54         project_name = "tfa-nightly"
  55         version["__version__"] += get_last_commit_time()
  56         sys.argv.remove("--nightly")
  57 
  58     return project_name, version
  59 
  60 
  61 def get_ext_modules():
  62     ext_modules = []
  63     if "--platlib-patch" in sys.argv:
  64         if sys.platform.startswith("linux"):
  65             # Manylinux2010 requires a patch for platlib
  66             ext_modules = [Extension("_foo", ["stub.cc"])]
  67         sys.argv.remove("--platlib-patch")
  68     return ext_modules
  69 
  70 
  71 class BinaryDistribution(Distribution):
  72     """This class is needed in order to create OS specific wheels."""
  73 
  74     def has_ext_modules(self):
  75         return True
  76 
  77 
  78 project_name, version = get_project_name_version()
  79 min_tf_version = version["MIN_TF_VERSION"]
  80 max_tf_version = version["MAX_TF_VERSION"]
  81 setup(
  82     name=project_name,
  83     version=version["__version__"],
  84     description=DOCLINES[0],
  85     long_description="\n".join(DOCLINES[2:]),
  86     author="Google Inc.",
  87     author_email="opensource@google.com",
  88     packages=find_packages(),
  89     ext_modules=get_ext_modules(),
  90     install_requires=Path("requirements.txt").read_text().splitlines(),
  91     extras_require={
  92         "tensorflow": ["tensorflow>={},<{}".format(min_tf_version, max_tf_version)],
  93         "tensorflow-gpu": [
  94             "tensorflow-gpu>={},<{}".format(min_tf_version, max_tf_version)
  95         ],
  96         "tensorflow-cpu": [
  97             "tensorflow-cpu>={},<{}".format(min_tf_version, max_tf_version)
  98         ],
  99     },
  100     include_package_data=True,
  101     zip_safe=False,
  102     distclass=BinaryDistribution,
  103     classifiers=[
  104         "Development Status :: 4 - Beta",
  105         "Intended Audience :: Developers",
  106         "Intended Audience :: Education",
  107         "Intended Audience :: Science/Research",
  108         "License :: OSI Approved :: Apache Software License",
  109         "Programming Language :: Python :: 3",
  110         "Programming Language :: Python :: 3.5",
  111         "Programming Language :: Python :: 3.6",
  112         "Programming Language :: Python :: 3.7",
  113         "Programming Language :: Python :: 3.8",
  114         "Topic :: Scientific/Engineering :: Mathematics",
  115         "Topic :: Software Development :: Libraries :: Python Modules",
  116         "Topic :: Software Development :: Libraries",
  117     ],
  118     license="Apache 2.0",
  119     keywords="tensorflow addons machine learning",
  120 )
  121
  [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
  @@ -107,7 +107,6 @@
           "Intended Audience :: Science/Research",
           "License :: OSI Approved :: Apache Software License",
           "Programming Language :: Python :: 3",
  -        "Programming Language :: Python :: 3.5",
           "Programming Language :: Python :: 3.6",
           "Programming Language :: Python :: 3.7",
           "Programming Language :: Python :: 3.8",
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -107,7 +107,6 @@\n         \"Intended Audience :: Science/Research\",\n         \"License :: OSI Approved :: Apache Software License\",\n         \"Programming Language :: Python :: 3\",\n-        \"Programming Language :: Python :: 3.5\",\n         \"Programming Language :: Python :: 3.6\",\n         \"Programming Language :: Python :: 3.7\",\n         \"Programming Language :: Python :: 3.8\",\n", "issue": "Drop Python3.5 Support\nPer SIG Build, python3.5 will not be supported in TF2.4 since it has reached end of life. We should align.\n", "before_files": [{"content": "# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\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#     http://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.\n# ==============================================================================\n\"\"\"TensorFlow Addons.\n\nTensorFlow Addons is a repository of contributions that conform to well-\nestablished API patterns, but implement new functionality not available\nin core TensorFlow. TensorFlow natively supports a large number of\noperators, layers, metrics, losses, and optimizers. However, in a fast\nmoving field like ML, there are many interesting new developments that\ncannot be integrated into core TensorFlow (because their broad\napplicability is not yet clear, or it is mostly used by a smaller subset\nof the community).\n\"\"\"\n\nimport os\nfrom pathlib import Path\nimport sys\n\nfrom datetime import datetime\nfrom setuptools import find_packages\nfrom setuptools import setup\nfrom setuptools.dist import Distribution\nfrom setuptools import Extension\n\nDOCLINES = __doc__.split(\"\\n\")\n\n\ndef get_last_commit_time() -> str:\n    string_time = os.getenv(\"NIGHTLY_TIME\").replace('\"', \"\")\n    return datetime.strptime(string_time, \"%Y-%m-%dT%H:%M:%SZ\").strftime(\"%Y%m%d%H%M%S\")\n\n\ndef get_project_name_version():\n    # Version\n    version = {}\n    base_dir = os.path.dirname(os.path.abspath(__file__))\n    with open(os.path.join(base_dir, \"tensorflow_addons\", \"version.py\")) as fp:\n        exec(fp.read(), version)\n\n    project_name = \"tensorflow-addons\"\n    if \"--nightly\" in sys.argv:\n        project_name = \"tfa-nightly\"\n        version[\"__version__\"] += get_last_commit_time()\n        sys.argv.remove(\"--nightly\")\n\n    return project_name, version\n\n\ndef get_ext_modules():\n    ext_modules = []\n    if \"--platlib-patch\" in sys.argv:\n        if sys.platform.startswith(\"linux\"):\n            # Manylinux2010 requires a patch for platlib\n            ext_modules = [Extension(\"_foo\", [\"stub.cc\"])]\n        sys.argv.remove(\"--platlib-patch\")\n    return ext_modules\n\n\nclass BinaryDistribution(Distribution):\n    \"\"\"This class is needed in order to create OS specific wheels.\"\"\"\n\n    def has_ext_modules(self):\n        return True\n\n\nproject_name, version = get_project_name_version()\nmin_tf_version = version[\"MIN_TF_VERSION\"]\nmax_tf_version = version[\"MAX_TF_VERSION\"]\nsetup(\n    name=project_name,\n    version=version[\"__version__\"],\n    description=DOCLINES[0],\n    long_description=\"\\n\".join(DOCLINES[2:]),\n    author=\"Google Inc.\",\n    author_email=\"opensource@google.com\",\n    packages=find_packages(),\n    ext_modules=get_ext_modules(),\n    install_requires=Path(\"requirements.txt\").read_text().splitlines(),\n    extras_require={\n        \"tensorflow\": [\"tensorflow>={},<{}\".format(min_tf_version, max_tf_version)],\n        \"tensorflow-gpu\": [\n            \"tensorflow-gpu>={},<{}\".format(min_tf_version, max_tf_version)\n        ],\n        \"tensorflow-cpu\": [\n            \"tensorflow-cpu>={},<{}\".format(min_tf_version, max_tf_version)\n        ],\n    },\n    include_package_data=True,\n    zip_safe=False,\n    distclass=BinaryDistribution,\n    classifiers=[\n        \"Development Status :: 4 - Beta\",\n        \"Intended Audience :: Developers\",\n        \"Intended Audience :: Education\",\n        \"Intended Audience :: Science/Research\",\n        \"License :: OSI Approved :: Apache Software License\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.5\",\n        \"Programming Language :: Python :: 3.6\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\n        \"Topic :: Scientific/Engineering :: Mathematics\",\n        \"Topic :: Software Development :: Libraries :: Python Modules\",\n        \"Topic :: Software Development :: Libraries\",\n    ],\n    license=\"Apache 2.0\",\n    keywords=\"tensorflow addons machine learning\",\n)\n", "path": "setup.py"}]}