prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Auto release on PyPi on tags
  General interest in that? Should be pretty easy with GitHub Actions, only have to set the a Pypi API key on your end.
  
  Example: https://github.com/microsoft/playwright-python/new/master?filename=.github%2Fworkflows%2Fpython-publish.yml&workflow_template=python-publish
  
  </issue>
  <code>
  [start of upload_package.py]
  1 # Copyright (c) Microsoft Corporation.
  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 import subprocess
  16 
  17 subprocess.run("python -m twine upload dist/*", shell=True)
  18
  [end of upload_package.py]
  [start of setup.py]
  1 # Copyright (c) Microsoft Corporation.
  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 import setuptools
  16 
  17 with open("README.md", "r", encoding="utf-8") as fh:
  18     long_description = fh.read()
  19 
  20 setuptools.setup(
  21     name="playwright",
  22     version="0.0.3",
  23     author="Microsoft Corporation",
  24     author_email="",
  25     description="A high-level API to automate web browsers",
  26     long_description=long_description,
  27     long_description_content_type="text/markdown",
  28     url="https://github.com/Microsoft/playwright-python",
  29     packages=setuptools.find_packages(),
  30     include_package_data=True,
  31     install_requires=["pyee", "typing-extensions",],
  32     classifiers=[
  33         "Topic :: Software Development :: Testing",
  34         "Topic :: Internet :: WWW/HTTP :: Browsers",
  35         "Intended Audience :: Developers",
  36         "Programming Language :: Python :: 3",
  37         "Programming Language :: Python :: 3.7",
  38         "Programming Language :: Python :: 3.8",
  39         "License :: OSI Approved :: Apache Software License",
  40         "Operating System :: OS Independent",
  41     ],
  42     python_requires=">=3.7",
  43 )
  44
  [end of setup.py]
  [start of playwright/__init__.py]
  1 # Copyright (c) Microsoft Corporation.
  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 from playwright.main import playwright_object
  16 import playwright.helper as helper
  17 
  18 chromium = playwright_object.chromium
  19 firefox = playwright_object.firefox
  20 webkit = playwright_object.webkit
  21 devices = playwright_object.devices
  22 browser_types = playwright_object.browser_types
  23 Error = helper.Error
  24 TimeoutError = helper.TimeoutError
  25 
  26 __all__ = [
  27     "browser_types",
  28     "chromium",
  29     "firefox",
  30     "webkit",
  31     "devices",
  32     "Error",
  33     "TimeoutError",
  34 ]
  35
  [end of playwright/__init__.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/playwright/__init__.py b/playwright/__init__.py
  --- a/playwright/__init__.py
  +++ b/playwright/__init__.py
  @@ -12,6 +12,7 @@
   # See the License for the specific language governing permissions and
   # limitations under the License.
   
  +from playwright._repo_version import version as __version__  # noqa:F401
   from playwright.main import playwright_object
   import playwright.helper as helper
   
  diff --git a/setup.py b/setup.py
  --- a/setup.py
  +++ b/setup.py
  @@ -19,16 +19,15 @@
   
   setuptools.setup(
       name="playwright",
  -    version="0.0.3",
       author="Microsoft Corporation",
       author_email="",
       description="A high-level API to automate web browsers",
       long_description=long_description,
       long_description_content_type="text/markdown",
       url="https://github.com/Microsoft/playwright-python",
  -    packages=setuptools.find_packages(),
  +    packages=["playwright"],
       include_package_data=True,
  -    install_requires=["pyee", "typing-extensions",],
  +    install_requires=["pyee", "typing-extensions"],
       classifiers=[
           "Topic :: Software Development :: Testing",
           "Topic :: Internet :: WWW/HTTP :: Browsers",
  @@ -40,4 +39,10 @@
           "Operating System :: OS Independent",
       ],
       python_requires=">=3.7",
  +    use_scm_version={
  +        "version_scheme": "post-release",
  +        "write_to": "playwright/_repo_version.py",
  +        "write_to_template": 'version = "{version}"\n',
  +    },
  +    setup_requires=["setuptools_scm"],
   )
  diff --git a/upload_package.py b/upload_package.py
  deleted file mode 100644
  --- a/upload_package.py
  +++ /dev/null
  @@ -1,17 +0,0 @@
  -# Copyright (c) Microsoft Corporation.
  -#
  -# Licensed under the Apache License, Version 2.0 (the "License");
  -# you may not use this file except in compliance with the License.
  -# You may obtain a copy of the License at
  -#
  -# http://www.apache.org/licenses/LICENSE-2.0
  -#
  -# Unless required by applicable law or agreed to in writing, software
  -# distributed under the License is distributed on an "AS IS" BASIS,
  -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  -# See the License for the specific language governing permissions and
  -# limitations under the License.
  -
  -import subprocess
  -
  -subprocess.run("python -m twine upload dist/*", shell=True)
  
verification_info: {"golden_diff": "diff --git a/playwright/__init__.py b/playwright/__init__.py\n--- a/playwright/__init__.py\n+++ b/playwright/__init__.py\n@@ -12,6 +12,7 @@\n # See the License for the specific language governing permissions and\n # limitations under the License.\n \n+from playwright._repo_version import version as __version__  # noqa:F401\n from playwright.main import playwright_object\n import playwright.helper as helper\n \ndiff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -19,16 +19,15 @@\n \n setuptools.setup(\n     name=\"playwright\",\n-    version=\"0.0.3\",\n     author=\"Microsoft Corporation\",\n     author_email=\"\",\n     description=\"A high-level API to automate web browsers\",\n     long_description=long_description,\n     long_description_content_type=\"text/markdown\",\n     url=\"https://github.com/Microsoft/playwright-python\",\n-    packages=setuptools.find_packages(),\n+    packages=[\"playwright\"],\n     include_package_data=True,\n-    install_requires=[\"pyee\", \"typing-extensions\",],\n+    install_requires=[\"pyee\", \"typing-extensions\"],\n     classifiers=[\n         \"Topic :: Software Development :: Testing\",\n         \"Topic :: Internet :: WWW/HTTP :: Browsers\",\n@@ -40,4 +39,10 @@\n         \"Operating System :: OS Independent\",\n     ],\n     python_requires=\">=3.7\",\n+    use_scm_version={\n+        \"version_scheme\": \"post-release\",\n+        \"write_to\": \"playwright/_repo_version.py\",\n+        \"write_to_template\": 'version = \"{version}\"\\n',\n+    },\n+    setup_requires=[\"setuptools_scm\"],\n )\ndiff --git a/upload_package.py b/upload_package.py\ndeleted file mode 100644\n--- a/upload_package.py\n+++ /dev/null\n@@ -1,17 +0,0 @@\n-# Copyright (c) Microsoft Corporation.\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-import subprocess\n-\n-subprocess.run(\"python -m twine upload dist/*\", shell=True)\n", "issue": "Auto release on PyPi on tags\nGeneral interest in that? Should be pretty easy with GitHub Actions, only have to set the a Pypi API key on your end.\r\n\r\nExample: https://github.com/microsoft/playwright-python/new/master?filename=.github%2Fworkflows%2Fpython-publish.yml&workflow_template=python-publish\n", "before_files": [{"content": "# Copyright (c) Microsoft Corporation.\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\nimport subprocess\n\nsubprocess.run(\"python -m twine upload dist/*\", shell=True)\n", "path": "upload_package.py"}, {"content": "# Copyright (c) Microsoft Corporation.\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\nimport setuptools\n\nwith open(\"README.md\", \"r\", encoding=\"utf-8\") as fh:\n    long_description = fh.read()\n\nsetuptools.setup(\n    name=\"playwright\",\n    version=\"0.0.3\",\n    author=\"Microsoft Corporation\",\n    author_email=\"\",\n    description=\"A high-level API to automate web browsers\",\n    long_description=long_description,\n    long_description_content_type=\"text/markdown\",\n    url=\"https://github.com/Microsoft/playwright-python\",\n    packages=setuptools.find_packages(),\n    include_package_data=True,\n    install_requires=[\"pyee\", \"typing-extensions\",],\n    classifiers=[\n        \"Topic :: Software Development :: Testing\",\n        \"Topic :: Internet :: WWW/HTTP :: Browsers\",\n        \"Intended Audience :: Developers\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\n        \"License :: OSI Approved :: Apache Software License\",\n        \"Operating System :: OS Independent\",\n    ],\n    python_requires=\">=3.7\",\n)\n", "path": "setup.py"}, {"content": "# Copyright (c) Microsoft Corporation.\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\nfrom playwright.main import playwright_object\nimport playwright.helper as helper\n\nchromium = playwright_object.chromium\nfirefox = playwright_object.firefox\nwebkit = playwright_object.webkit\ndevices = playwright_object.devices\nbrowser_types = playwright_object.browser_types\nError = helper.Error\nTimeoutError = helper.TimeoutError\n\n__all__ = [\n    \"browser_types\",\n    \"chromium\",\n    \"firefox\",\n    \"webkit\",\n    \"devices\",\n    \"Error\",\n    \"TimeoutError\",\n]\n", "path": "playwright/__init__.py"}]}